mirror of https://github.com/zkat/miette.git
fix(wrapper): complete forwarding Diagnostic implementations
They were missing `diagnostic_source()` which was recently added.
This commit is contained in:
parent
aee218757b
commit
5569cd9898
|
|
@ -102,6 +102,10 @@ impl Diagnostic for BoxedError {
|
||||||
fn related<'a>(&'a self) -> Option<Box<dyn Iterator<Item = &'a dyn Diagnostic> + 'a>> {
|
fn related<'a>(&'a self) -> Option<Box<dyn Iterator<Item = &'a dyn Diagnostic> + 'a>> {
|
||||||
self.0.related()
|
self.0.related()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn diagnostic_source(&self) -> Option<&dyn Diagnostic> {
|
||||||
|
self.0.diagnostic_source()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Debug for BoxedError {
|
impl Debug for BoxedError {
|
||||||
|
|
@ -151,6 +155,10 @@ impl<E: Diagnostic, C: SourceCode> Diagnostic for WithSourceCode<E, C> {
|
||||||
fn related<'a>(&'a self) -> Option<Box<dyn Iterator<Item = &'a dyn Diagnostic> + 'a>> {
|
fn related<'a>(&'a self) -> Option<Box<dyn Iterator<Item = &'a dyn Diagnostic> + 'a>> {
|
||||||
self.error.related()
|
self.error.related()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn diagnostic_source(&self) -> Option<&dyn Diagnostic> {
|
||||||
|
self.error.diagnostic_source()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<C: SourceCode> Diagnostic for WithSourceCode<Report, C> {
|
impl<C: SourceCode> Diagnostic for WithSourceCode<Report, C> {
|
||||||
|
|
@ -181,6 +189,10 @@ impl<C: SourceCode> Diagnostic for WithSourceCode<Report, C> {
|
||||||
fn related<'a>(&'a self) -> Option<Box<dyn Iterator<Item = &'a dyn Diagnostic> + 'a>> {
|
fn related<'a>(&'a self) -> Option<Box<dyn Iterator<Item = &'a dyn Diagnostic> + 'a>> {
|
||||||
self.error.related()
|
self.error.related()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn diagnostic_source(&self) -> Option<&dyn Diagnostic> {
|
||||||
|
self.error.diagnostic_source()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<E: Debug, C> Debug for WithSourceCode<E, C> {
|
impl<E: Debug, C> Debug for WithSourceCode<E, C> {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue