diff --git a/sdk/src/types/block/error.rs b/sdk/src/types/block/error.rs index 9a909e5f1f..85c7d036a0 100644 --- a/sdk/src/types/block/error.rs +++ b/sdk/src/types/block/error.rs @@ -177,6 +177,9 @@ pub enum Error { Fallback(FallbackError), } +#[cfg(feature = "std")] +impl std::error::Error for Error {} + impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { @@ -391,9 +394,6 @@ impl From for Error { } } -#[cfg(feature = "std")] -impl std::error::Error for Error {} - #[cfg(feature = "std")] #[derive(Debug)] pub struct FallbackError(pub(crate) Box);