From d503004cf04ff02530ffcb9709bab6d639b6a062 Mon Sep 17 00:00:00 2001 From: Diggory Hardy Date: Mon, 25 Nov 2024 13:37:20 +0000 Subject: [PATCH] Impl core::error::Error for Error on no_std --- src/error.rs | 2 ++ src/error_std_impls.rs | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/error.rs b/src/error.rs index b27ef26b..405aedc0 100644 --- a/src/error.rs +++ b/src/error.rs @@ -152,6 +152,8 @@ impl fmt::Display for Error { } } +impl core::error::Error for Error {} + fn internal_desc(error: Error) -> Option<&'static str> { let desc = match error { Error::UNSUPPORTED => "getrandom: this target is not supported", diff --git a/src/error_std_impls.rs b/src/error_std_impls.rs index 2c326012..0e325307 100644 --- a/src/error_std_impls.rs +++ b/src/error_std_impls.rs @@ -11,5 +11,3 @@ impl From for io::Error { } } } - -impl std::error::Error for Error {}