diff --git a/src/protocol.rs b/src/protocol.rs index a26f2a5..90be836 100644 --- a/src/protocol.rs +++ b/src/protocol.rs @@ -39,12 +39,24 @@ pub trait Diagnostic: std::error::Error { impl std::error::Error for Box {} -impl From for Box { +impl From for Box { fn from(diag: T) -> Self { Box::new(diag) } } +impl From for Box { + fn from(diag: T) -> Self { + Box::::from(diag) + } +} + +impl From for Box { + fn from(diag: T) -> Self { + Box::::from(diag) + } +} + /** Protocol for [Diagnostic] handlers, which are responsible for actually printing out Diagnostics.