diff --git a/crates/napi/src/error.rs b/crates/napi/src/error.rs index 3e9a49c4..b716cd86 100644 --- a/crates/napi/src/error.rs +++ b/crates/napi/src/error.rs @@ -47,9 +47,9 @@ impl> ToNapiValue for Error { unsafe impl Send for Error where S: Send + AsRef {} unsafe impl Sync for Error where S: Sync + AsRef {} -impl error::Error for Error {} +impl + std::fmt::Debug> error::Error for Error {} -impl From for Error { +impl> From for Error { fn from(_: std::convert::Infallible) -> Self { unreachable!() } @@ -99,7 +99,7 @@ impl From for Error { } } -impl fmt::Display for Error { +impl + std::fmt::Debug> fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { if !self.reason.is_empty() { write!(f, "{:?}, {}", self.status, self.reason)