From 9c4a62965960ae02efb63be86838de0c72d1b559 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Mon, 12 Aug 2024 20:16:12 +1000 Subject: [PATCH] Wrap CompactTarget impl block in temporary module `rustfmt` is unable to format macro calls so instead we wrap the impl blocks in a module to enable formatting in the next commit. --- bitcoin/src/pow.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bitcoin/src/pow.rs b/bitcoin/src/pow.rs index bbd812faa..32a47a9b3 100644 --- a/bitcoin/src/pow.rs +++ b/bitcoin/src/pow.rs @@ -355,6 +355,9 @@ impl CompactTarget { pub fn to_consensus(self) -> u32 { self.0 } } +mod tmp { + use super::*; + impl CompactTarget { /// Creates a `CompactTarget` from a prefixed hex string. pub fn from_hex(s: &str) -> Result { @@ -444,6 +447,7 @@ impl CompactTarget { CompactTarget::from_next_work_required(bits, timespan.into(), params) } } +} impl From for Target { fn from(c: CompactTarget) -> Self { Target::from_compact(c) }