Skip to content

Commit e23289a

Browse files
committed
impl serde::*::StdError for our Errors
1 parent d4d5383 commit e23289a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/de/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ impl ::std::error::Error for Error {
8484
}
8585
}
8686

87+
impl serde::de::StdError for Error {}
88+
8789
pub(crate) struct Deserializer<'b> {
8890
slice: &'b [u8],
8991
index: usize,

src/ser/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ impl ::std::error::Error for Error {
4747
}
4848
}
4949

50+
impl serde::ser::StdError for Error {}
51+
5052
impl fmt::Display for Error {
5153
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
5254
write!(f, "Buffer is full")

0 commit comments

Comments
 (0)