From 7eeb169f9b51e2a30997d6c92aa3e170a2927b7f Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 5 Mar 2023 10:16:06 -0800 Subject: [PATCH] Fix message duplication between error Display and source() --- src/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/error.rs b/src/error.rs index 1875ef08b..0898baf90 100644 --- a/src/error.rs +++ b/src/error.rs @@ -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, } }