Skip to content

Commit 724809a

Browse files
committed
Stop duplication in error source chain
Don't both print the contained error in the Display impl and also return it in source
1 parent f73d69d commit 724809a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mullvad-encrypted-dns-proxy/src/config_resolver.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ impl fmt::Display for Error {
3434
impl std::error::Error for Error {
3535
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
3636
match self {
37-
Self::ResolutionError(ref err) => Some(err),
38-
Self::Timeout(ref err) => Some(err),
37+
Self::ResolutionError(ref err) => err.source(),
38+
Self::Timeout(ref err) => err.source(),
3939
}
4040
}
4141
}

0 commit comments

Comments
 (0)