Format `Script` blocks

This commit is produced by running `cargo +nightly fmt`
This commit is contained in:
Martin Habovstiak 2024-08-11 15:32:42 +02:00
parent b027edffe7
commit b99bdcfdd6
1 changed files with 410 additions and 410 deletions

View File

@ -137,7 +137,7 @@ impl Script {
mod tmp_pub { mod tmp_pub {
use super::*; use super::*;
impl Script { impl Script {
/// Returns an iterator over script bytes. /// Returns an iterator over script bytes.
#[inline] #[inline]
pub fn bytes(&self) -> Bytes<'_> { Bytes(self.as_bytes().iter().copied()) } pub fn bytes(&self) -> Bytes<'_> { Bytes(self.as_bytes().iter().copied()) }
@ -503,12 +503,12 @@ impl Script {
pub fn first_opcode(&self) -> Option<Opcode> { pub fn first_opcode(&self) -> Option<Opcode> {
self.as_bytes().first().copied().map(From::from) self.as_bytes().first().copied().map(From::from)
} }
} }
} }
mod tmp_priv { mod tmp_priv {
use super::*; use super::*;
impl Script { impl Script {
pub(crate) fn minimal_non_dust_internal(&self, dust_relay_fee: u64) -> crate::Amount { pub(crate) fn minimal_non_dust_internal(&self, dust_relay_fee: u64) -> crate::Amount {
// This must never be lower than Bitcoin Core's GetDustThreshold() (as of v0.21) as it may // This must never be lower than Bitcoin Core's GetDustThreshold() (as of v0.21) as it may
// otherwise allow users to create transactions which likely can never be broadcast/confirmed. // otherwise allow users to create transactions which likely can never be broadcast/confirmed.
@ -594,7 +594,7 @@ impl Script {
_ => None, _ => None,
} }
} }
} }
} }
/// Iterator over bytes of a script /// Iterator over bytes of a script