Skip to content

Commit

Permalink
Merge pull request #992 from dtolnay/errorsource
Browse files Browse the repository at this point in the history
Fix message duplication between error Display and source()
  • Loading branch information
dtolnay authored Mar 5, 2023
2 parents d9447c3 + 7eeb169 commit 3e418b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ impl serde::de::StdError for Error {
#[cfg(feature = "std")]
fn source(&self) -> Option<&(dyn error::Error + 'static)> {
match &self.err.code {
ErrorCode::Io(err) => Some(err),
ErrorCode::Io(err) => err.source(),
_ => None,
}
}
Expand Down

0 comments on commit 3e418b1

Please sign in to comment.