Skip to content

Commit 737e8b4

Browse files
committed
Put Error impl block below Display
In an effort to be uniform throughout the codebase; put the `std::error::Error` impl block below the `Display` impl block.
1 parent a8f3ba3 commit 737e8b4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/util/bip158.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ pub enum Error {
7474
Io(io::Error),
7575
}
7676

77-
#[cfg(feature = "std")]
78-
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
79-
impl ::std::error::Error for Error {}
80-
8177
impl Display for Error {
8278
fn fmt(&self, f: &mut Formatter) -> Result<(), fmt::Error> {
8379
match *self {
@@ -87,6 +83,10 @@ impl Display for Error {
8783
}
8884
}
8985

86+
#[cfg(feature = "std")]
87+
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
88+
impl ::std::error::Error for Error {}
89+
9090
impl From<io::Error> for Error {
9191
fn from(io: io::Error) -> Self {
9292
Error::Io(io)

0 commit comments

Comments
 (0)