diff --git a/elliptic-curve/src/error.rs b/elliptic-curve/src/error.rs index ba2d0b368..1944839bc 100644 --- a/elliptic-curve/src/error.rs +++ b/elliptic-curve/src/error.rs @@ -9,6 +9,8 @@ pub type Result = core::result::Result; #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub struct Error; +impl core::error::Error for Error {} + impl Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_str("crypto error") @@ -40,6 +42,3 @@ impl From for Error { Error } } - -#[cfg(feature = "std")] -impl std::error::Error for Error {} diff --git a/elliptic-curve/src/lib.rs b/elliptic-curve/src/lib.rs index d98bab692..ff5acd88f 100644 --- a/elliptic-curve/src/lib.rs +++ b/elliptic-curve/src/lib.rs @@ -17,6 +17,8 @@ clippy::mod_module_files, clippy::panic, clippy::panic_in_result_fn, + clippy::std_instead_of_alloc, + clippy::std_instead_of_core, clippy::unwrap_used, missing_debug_implementations, missing_docs,