diff --git a/bitcoin/src/blockdata/script/builder.rs b/bitcoin/src/blockdata/script/builder.rs index ea8658134..b8a52ea91 100644 --- a/bitcoin/src/blockdata/script/builder.rs +++ b/bitcoin/src/blockdata/script/builder.rs @@ -151,7 +151,5 @@ impl fmt::Display for Builder { } impl fmt::Debug for Builder { - fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { - fmt::Display::fmt(self, f) - } + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { fmt::Display::fmt(self, f) } } diff --git a/bitcoin/src/p2p/mod.rs b/bitcoin/src/p2p/mod.rs index 040e2dfc4..b594a6693 100644 --- a/bitcoin/src/p2p/mod.rs +++ b/bitcoin/src/p2p/mod.rs @@ -293,9 +293,7 @@ impl fmt::Display for Magic { } impl fmt::Debug for Magic { - fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { - fmt::Display::fmt(self, f) - } + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { fmt::Display::fmt(self, f) } } impl fmt::LowerHex for Magic { diff --git a/primitives/src/opcodes.rs b/primitives/src/opcodes.rs index d1ab77b73..bd9e8ce86 100644 --- a/primitives/src/opcodes.rs +++ b/primitives/src/opcodes.rs @@ -440,9 +440,7 @@ impl From for Opcode { } impl fmt::Debug for Opcode { - fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { - fmt::Display::fmt(self, f) - } + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { fmt::Display::fmt(self, f) } } #[cfg(feature = "serde")] diff --git a/units/src/parse.rs b/units/src/parse.rs index b51b60fea..21a674220 100644 --- a/units/src/parse.rs +++ b/units/src/parse.rs @@ -137,7 +137,7 @@ macro_rules! impl_parse_str_from_int_infallible { /// Implements `TryFrom<$from> for $to` using `parse::int`, mapping the output using infallible /// conversion function `fn`. #[macro_export] -#[doc(hidden)] // Helper macro called by `impl_parse_str_from_int_infallible`. +#[doc(hidden)] // Helper macro called by `impl_parse_str_from_int_infallible`. macro_rules! impl_tryfrom_str_from_int_infallible { ($($from:ty, $to:ident, $inner:ident, $fn:ident);*) => { $( @@ -192,7 +192,7 @@ macro_rules! impl_parse_str { /// Implements `TryFrom<$from> for $to`. #[macro_export] -#[doc(hidden)] // Helper macro called by `impl_parse_str`. +#[doc(hidden)] // Helper macro called by `impl_parse_str`. macro_rules! impl_tryfrom_str { ($($from:ty, $to:ty, $err:ty, $inner_fn:expr);*) => { $(