use display for serde errors
This commit is contained in:
parent
ebf807dcce
commit
87048fc83b
|
@ -35,13 +35,13 @@ impl de::Error for Error {
|
|||
impl Display for Error {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match self {
|
||||
Error::Message(msg) => write!(f, "{}", msg),
|
||||
Error::Message(msg) => write!(f, "{msg}"),
|
||||
Error::Eof => write!(f, "unexpected EOF"),
|
||||
Error::BadOp => write!(f, "bad op"),
|
||||
Error::BadEntryCount => write!(f, "wrong amount of entries"),
|
||||
Error::BadWidth => write!(f, "wrong width for given type"),
|
||||
Error::BadRead(e) => write!(f, "{:#?}", e),
|
||||
Error::BadUtf8Read(e) => write!(f, "{:#?}", e),
|
||||
Error::BadRead(e) => write!(f, "{e}"),
|
||||
Error::BadUtf8Read(e) => write!(f, "{e}"),
|
||||
Error::ExpectedData => write!(f, "expected data"),
|
||||
Error::ExpectedList => write!(f, "expected list"),
|
||||
Error::ExpectedConst => write!(f, "expected const"),
|
||||
|
|
Loading…
Reference in New Issue