From 5569cd9898fdc28f0cd45a788a28590fa78b7a7f Mon Sep 17 00:00:00 2001 From: Rain Date: Mon, 24 Oct 2022 15:48:26 -0700 Subject: [PATCH] fix(wrapper): complete forwarding Diagnostic implementations They were missing `diagnostic_source()` which was recently added. --- src/eyreish/wrapper.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/eyreish/wrapper.rs b/src/eyreish/wrapper.rs index a5e67db..b8c55ab 100644 --- a/src/eyreish/wrapper.rs +++ b/src/eyreish/wrapper.rs @@ -102,6 +102,10 @@ impl Diagnostic for BoxedError { fn related<'a>(&'a self) -> Option + 'a>> { self.0.related() } + + fn diagnostic_source(&self) -> Option<&dyn Diagnostic> { + self.0.diagnostic_source() + } } impl Debug for BoxedError { @@ -151,6 +155,10 @@ impl Diagnostic for WithSourceCode { fn related<'a>(&'a self) -> Option + 'a>> { self.error.related() } + + fn diagnostic_source(&self) -> Option<&dyn Diagnostic> { + self.error.diagnostic_source() + } } impl Diagnostic for WithSourceCode { @@ -181,6 +189,10 @@ impl Diagnostic for WithSourceCode { fn related<'a>(&'a self) -> Option + 'a>> { self.error.related() } + + fn diagnostic_source(&self) -> Option<&dyn Diagnostic> { + self.error.diagnostic_source() + } } impl Debug for WithSourceCode {