From 4b733d4dad8056dc87b9673ea9f59e6d71507a6c Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 17 Apr 2025 11:43:02 +1000 Subject: [PATCH] Run the formatter --- primitives/src/script/borrowed.rs | 2 +- primitives/src/script/mod.rs | 1 - units/src/amount/mod.rs | 4 +--- units/src/fee.rs | 4 ++-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/primitives/src/script/borrowed.rs b/primitives/src/script/borrowed.rs index c7269e33d..8e0ea3f5a 100644 --- a/primitives/src/script/borrowed.rs +++ b/primitives/src/script/borrowed.rs @@ -92,7 +92,7 @@ impl Script { /// Returns the script data as a byte slice. /// /// This is just the script bytes **not** consensus encoding (which includes a length prefix). - #[inline] + #[inline] pub const fn as_bytes(&self) -> &[u8] { &self.0 } /// Returns the script data as a mutable byte slice. diff --git a/primitives/src/script/mod.rs b/primitives/src/script/mod.rs index 3a0244c59..a48f9c9b7 100644 --- a/primitives/src/script/mod.rs +++ b/primitives/src/script/mod.rs @@ -752,7 +752,6 @@ mod tests { assert!(WScriptHash::try_from(&script).is_err()); } - #[test] fn try_from_script_for_wscript_hash() { let script = Script::from_bytes(&[0x51; 10_000]); diff --git a/units/src/amount/mod.rs b/units/src/amount/mod.rs index 9a4f715ba..b08e6ebb4 100644 --- a/units/src/amount/mod.rs +++ b/units/src/amount/mod.rs @@ -604,9 +604,7 @@ impl CheckedSum for T where T: Iterator, { - fn checked_sum(mut self) -> Option { - self.try_fold(Amount::ZERO, Amount::checked_add) - } + fn checked_sum(mut self) -> Option { self.try_fold(Amount::ZERO, Amount::checked_add) } } impl CheckedSum for T diff --git a/units/src/fee.rs b/units/src/fee.rs index 009dd34df..f7eee0af5 100644 --- a/units/src/fee.rs +++ b/units/src/fee.rs @@ -13,10 +13,10 @@ use core::ops; -use crate::{Amount, FeeRate, MathOp, NumOpResult, OptionExt, Weight}; - use NumOpResult as R; +use crate::{Amount, FeeRate, MathOp, NumOpResult, OptionExt, Weight}; + impl Amount { /// Checked weight ceiling division. ///