summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2024-10-30 15:22:05 +0100
committerLinus Färnstrand <linus@mullvad.net>2024-10-31 09:51:57 +0100
commit724809afc0204d3a22ba1b65a5958522843a0d8d (patch)
tree7500ffd70a0ded04622da31b02ce2ca6ad63e9fa
parentf73d69de09f6080e30099e1f7eb68451b4e93317 (diff)
downloadmullvadvpn-724809afc0204d3a22ba1b65a5958522843a0d8d.tar.xz
mullvadvpn-724809afc0204d3a22ba1b65a5958522843a0d8d.zip
Stop duplication in error source chain
Don't both print the contained error in the Display impl and also return it in source
-rw-r--r--mullvad-encrypted-dns-proxy/src/config_resolver.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/mullvad-encrypted-dns-proxy/src/config_resolver.rs b/mullvad-encrypted-dns-proxy/src/config_resolver.rs
index 5ff689b307..b763183a1b 100644
--- a/mullvad-encrypted-dns-proxy/src/config_resolver.rs
+++ b/mullvad-encrypted-dns-proxy/src/config_resolver.rs
@@ -34,8 +34,8 @@ impl fmt::Display for Error {
impl std::error::Error for Error {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match self {
- Self::ResolutionError(ref err) => Some(err),
- Self::Timeout(ref err) => Some(err),
+ Self::ResolutionError(ref err) => err.source(),
+ Self::Timeout(ref err) => err.source(),
}
}
}