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.
This commit is contained in:
parent
578143c09e
commit
9c4a629659
|
@ -355,6 +355,9 @@ impl CompactTarget {
|
||||||
pub fn to_consensus(self) -> u32 { self.0 }
|
pub fn to_consensus(self) -> u32 { self.0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mod tmp {
|
||||||
|
use super::*;
|
||||||
|
|
||||||
impl CompactTarget {
|
impl CompactTarget {
|
||||||
/// Creates a `CompactTarget` from a prefixed hex string.
|
/// Creates a `CompactTarget` from a prefixed hex string.
|
||||||
pub fn from_hex(s: &str) -> Result<Self, PrefixedHexError> {
|
pub fn from_hex(s: &str) -> Result<Self, PrefixedHexError> {
|
||||||
|
@ -444,6 +447,7 @@ impl CompactTarget {
|
||||||
CompactTarget::from_next_work_required(bits, timespan.into(), params)
|
CompactTarget::from_next_work_required(bits, timespan.into(), params)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl From<CompactTarget> for Target {
|
impl From<CompactTarget> for Target {
|
||||||
fn from(c: CompactTarget) -> Self { Target::from_compact(c) }
|
fn from(c: CompactTarget) -> Self { Target::from_compact(c) }
|
||||||
|
|
Loading…
Reference in New Issue