From f27e4c5da3122a15d7be19d721a220516eeadcd2 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 5 Mar 2023 13:12:29 -0800 Subject: [PATCH] Fix message duplication between error Display and source() --- src/error.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/error.rs b/src/error.rs index 4ab80bed..e4c22c4f 100644 --- a/src/error.rs +++ b/src/error.rs @@ -184,8 +184,8 @@ impl ErrorImpl { fn source(&self) -> Option<&(dyn StdError + 'static)> { match self { - ErrorImpl::Io(err) => Some(err), - ErrorImpl::FromUtf8(err) => Some(err), + ErrorImpl::Io(err) => err.source(), + ErrorImpl::FromUtf8(err) => err.source(), ErrorImpl::Shared(err) => err.source(), _ => None, }