Run the formatter

Run `cargo +nightly fmt`, no manual changes.
This commit is contained in:
Tobin C. Harding 2024-08-27 16:27:41 +10:00
parent 02c7d504fa
commit 8b089ffe40
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 47 additions and 46 deletions

View File

@ -355,8 +355,8 @@ impl TxOut {
} }
mod tmp { mod tmp {
use super::*; use super::*;
impl TxOut { impl TxOut {
/// The weight of this output. /// The weight of this output.
/// ///
/// Keep in mind that when adding a [`TxOut`] to a [`Transaction`] the total weight of the /// Keep in mind that when adding a [`TxOut`] to a [`Transaction`] the total weight of the
@ -369,7 +369,8 @@ impl TxOut {
/// `Weght::from_vb_checked(self.size().to_u64())` if you are concerned. /// `Weght::from_vb_checked(self.size().to_u64())` if you are concerned.
pub fn weight(&self) -> Weight { pub fn weight(&self) -> Weight {
// Size is equivalent to virtual size since all bytes of a TxOut are non-witness bytes. // Size is equivalent to virtual size since all bytes of a TxOut are non-witness bytes.
Weight::from_vb(self.size().to_u64()).expect("should never happen under normal conditions") Weight::from_vb(self.size().to_u64())
.expect("should never happen under normal conditions")
} }
/// Returns the total number of bytes that this output contributes to a transaction. /// Returns the total number of bytes that this output contributes to a transaction.
@ -404,7 +405,7 @@ impl TxOut {
pub fn minimal_non_dust_custom(script_pubkey: ScriptBuf, dust_relay_fee: FeeRate) -> Self { pub fn minimal_non_dust_custom(script_pubkey: ScriptBuf, dust_relay_fee: FeeRate) -> Self {
TxOut { value: script_pubkey.minimal_non_dust_custom(dust_relay_fee), script_pubkey } TxOut { value: script_pubkey.minimal_non_dust_custom(dust_relay_fee), script_pubkey }
} }
} }
} }
#[cfg(feature = "arbitrary")] #[cfg(feature = "arbitrary")]