diff --git a/bitcoin/src/blockdata/script.rs b/bitcoin/src/blockdata/script.rs index 6ea51a63..7359c3d1 100644 --- a/bitcoin/src/blockdata/script.rs +++ b/bitcoin/src/blockdata/script.rs @@ -137,7 +137,7 @@ pub struct Script([u8]); /// that all the safety/validity restrictions that apply to [`Script`] apply to `ScriptBuf` as well. /// /// [deref coercions]: https://doc.rust-lang.org/std/ops/trait.Deref.html#more-on-deref-coercion -#[derive(Default, Debug, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)] +#[derive(Default, Clone, PartialOrd, Ord, PartialEq, Eq, Hash)] pub struct ScriptBuf(Vec); impl ToOwned for Script { @@ -1315,6 +1315,12 @@ impl ScriptBuf { } } +impl fmt::Debug for ScriptBuf { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fmt::Debug::fmt(self.as_script(), f) + } +} + impl Deref for ScriptBuf { type Target = Script;