From 1f19d9b4bd8c55b9a7dc233c4b969d5d54d3a951 Mon Sep 17 00:00:00 2001 From: Fmt Bot Date: Sun, 4 May 2025 01:41:13 +0000 Subject: [PATCH] 2025-05-04 automated rustfmt nightly --- bitcoin/src/crypto/key.rs | 4 ++-- bitcoin/src/taproot/mod.rs | 6 +++++- units/src/amount/tests.rs | 2 +- units/tests/str.rs | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/bitcoin/src/crypto/key.rs b/bitcoin/src/crypto/key.rs index fe62e2583..be464bc33 100644 --- a/bitcoin/src/crypto/key.rs +++ b/bitcoin/src/crypto/key.rs @@ -888,7 +888,7 @@ impl TweakedPublicKey { } #[doc(hidden)] - #[deprecated(since="0.33.0", note="use to_x_only_public_key() instead")] + #[deprecated(since = "0.33.0", note = "use to_x_only_public_key() instead")] pub fn to_inner(self) -> XOnlyPublicKey { self.0 } /// Returns the underlying x-only public key. @@ -916,7 +916,7 @@ impl TweakedKeypair { pub fn dangerous_assume_tweaked(pair: Keypair) -> TweakedKeypair { TweakedKeypair(pair) } #[doc(hidden)] - #[deprecated(since="0.33.0", note="use to_keypair() instead")] + #[deprecated(since = "0.33.0", note = "use to_keypair() instead")] pub fn to_inner(self) -> Keypair { self.0 } /// Returns the underlying key pair. diff --git a/bitcoin/src/taproot/mod.rs b/bitcoin/src/taproot/mod.rs index 78a4f8a59..2a8c59c22 100644 --- a/bitcoin/src/taproot/mod.rs +++ b/bitcoin/src/taproot/mod.rs @@ -1784,7 +1784,11 @@ mod test { let script = ScriptBuf::from_hex_no_length_prefix(script_hex).unwrap(); let control_block = ControlBlock::from_hex(control_block_hex).unwrap(); assert_eq!(control_block_hex, control_block.serialize().to_lower_hex_string()); - assert!(control_block.verify_taproot_commitment(secp, out_pk.to_x_only_public_key(), &script)); + assert!(control_block.verify_taproot_commitment( + secp, + out_pk.to_x_only_public_key(), + &script + )); } #[test] diff --git a/units/src/amount/tests.rs b/units/src/amount/tests.rs index 8f93de9d5..61e2e9982 100644 --- a/units/src/amount/tests.rs +++ b/units/src/amount/tests.rs @@ -13,9 +13,9 @@ use std::panic; use ::serde::{Deserialize, Serialize}; use super::*; -use crate::{MathOp, NumOpResult}; #[cfg(feature = "alloc")] use crate::{FeeRate, Weight}; +use crate::{MathOp, NumOpResult}; #[track_caller] fn sat(sat: u64) -> Amount { Amount::from_sat(sat).unwrap() } diff --git a/units/tests/str.rs b/units/tests/str.rs index 98e06f72e..20d6013ec 100644 --- a/units/tests/str.rs +++ b/units/tests/str.rs @@ -2,8 +2,8 @@ //! Do basic regression tests on the `Display` and `FromStr` impls. -use bitcoin_units::locktime::{absolute, relative}; use bitcoin_units::amount::Denomination; +use bitcoin_units::locktime::{absolute, relative}; use bitcoin_units::{Amount, BlockHeight, BlockInterval, FeeRate, SignedAmount, Weight}; macro_rules! check {