diff --git a/src/protocol.rs b/src/protocol.rs index f6fd31a..f642def 100644 --- a/src/protocol.rs +++ b/src/protocol.rs @@ -52,7 +52,15 @@ pub trait Diagnostic: std::error::Error { } } -impl std::error::Error for Box {} +impl std::error::Error for Box { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { + (**self).source() + } + + fn cause(&self) -> Option<&dyn std::error::Error> { + self.source() + } +} impl From for Box