Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #360 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 fc039c6 + f27e4c5 commit f351fc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down

0 comments on commit f351fc7

Please sign in to comment.