Skip to content

Commit 9ec57f4

Browse files
Fmt Botgithub-actions[bot]
authored andcommitted
2026-01-11 automated rustfmt nightly
1 parent f71c02c commit 9ec57f4

2 files changed

Lines changed: 7 additions & 14 deletions

File tree

bitcoin/src/merkle_tree/block.rs

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -530,11 +530,12 @@ impl<'a> Arbitrary<'a> for MerkleBlock {
530530

531531
#[cfg(test)]
532532
mod tests {
533-
use hex::{DisplayHex, FromHex};
534-
use hex_lit::hex;
535533
#[cfg(feature = "std")]
536534
use core::cmp;
537535

536+
use hex::{DisplayHex, FromHex};
537+
use hex_lit::hex;
538+
538539
use super::*;
539540
use crate::block::Unchecked;
540541
use crate::consensus::encode;
@@ -555,11 +556,7 @@ mod tests {
555556
const P: usize = 1039;
556557
const Q: usize = 677;
557558

558-
const fn new(seed: usize) -> Self {
559-
Self {
560-
state: seed
561-
}
562-
}
559+
const fn new(seed: usize) -> Self { Self { state: seed } }
563560

564561
#[inline]
565562
fn next_usize(&mut self) -> usize {
@@ -568,14 +565,10 @@ mod tests {
568565
}
569566

570567
#[inline]
571-
fn next_in_range(&mut self, max: usize) -> usize {
572-
self.next_usize() % max
573-
}
568+
fn next_in_range(&mut self, max: usize) -> usize { self.next_usize() % max }
574569

575570
#[inline]
576-
fn next_u8(&mut self) -> u8 {
577-
self.next_usize().to_le_bytes()[0]
578-
}
571+
fn next_u8(&mut self) -> u8 { self.next_usize().to_le_bytes()[0] }
579572
}
580573

581574
#[cfg(feature = "std")]

network/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ pub mod as_core_arg {
197197
#![allow(clippy::missing_errors_doc)]
198198

199199
use crate::Network;
200-
200+
201201
#[allow(clippy::trivially_copy_pass_by_ref)] // `serde` controls the API.
202202
pub fn serialize<S>(network: &Network, serializer: S) -> Result<S::Ok, S::Error>
203203
where

0 commit comments

Comments
 (0)