diff --git a/src/util/bip158.rs b/src/util/bip158.rs index 4422bcc4..cdfb8f34 100644 --- a/src/util/bip158.rs +++ b/src/util/bip158.rs @@ -74,10 +74,6 @@ pub enum Error { Io(io::Error), } -#[cfg(feature = "std")] -#[cfg_attr(docsrs, doc(cfg(feature = "std")))] -impl ::std::error::Error for Error {} - impl Display for Error { fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> { match *self { @@ -87,6 +83,10 @@ impl Display for Error { } } +#[cfg(feature = "std")] +#[cfg_attr(docsrs, doc(cfg(feature = "std")))] +impl ::std::error::Error for Error {} + impl From for Error { fn from(io: io::Error) -> Self { Error::Io(io)