From 8746a809774355a743358b8b705cfada1afe1a4e Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Tue, 17 Sep 2024 13:07:28 +0200 Subject: [PATCH] `rustfmt`: Run on `sync/mod.rs` --- lightning/src/sync/mod.rs | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/lightning/src/sync/mod.rs b/lightning/src/sync/mod.rs index 348bd9027..0d0a76e3f 100644 --- a/lightning/src/sync/mod.rs +++ b/lightning/src/sync/mod.rs @@ -31,24 +31,35 @@ mod test_lockorder_checks; #[cfg(all(feature = "std", any(ldk_bench, not(test))))] pub(crate) mod fairrwlock; #[cfg(all(feature = "std", any(ldk_bench, not(test))))] -pub use {std::sync::{Arc, Mutex, Condvar, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard}, fairrwlock::FairRwLock}; +pub use { + fairrwlock::FairRwLock, + std::sync::{Arc, Condvar, Mutex, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard}, +}; #[cfg(all(feature = "std", any(ldk_bench, not(test))))] mod ext_impl { use super::*; impl<'a, T: 'a> LockTestExt<'a> for Mutex { #[inline] - fn held_by_thread(&self) -> LockHeldState { LockHeldState::Unsupported } + fn held_by_thread(&self) -> LockHeldState { + LockHeldState::Unsupported + } type ExclLock = MutexGuard<'a, T>; #[inline] - fn unsafe_well_ordered_double_lock_self(&'a self) -> MutexGuard { self.lock().unwrap() } + fn unsafe_well_ordered_double_lock_self(&'a self) -> MutexGuard { + self.lock().unwrap() + } } impl<'a, T: 'a> LockTestExt<'a> for RwLock { #[inline] - fn held_by_thread(&self) -> LockHeldState { LockHeldState::Unsupported } + fn held_by_thread(&self) -> LockHeldState { + LockHeldState::Unsupported + } type ExclLock = RwLockWriteGuard<'a, T>; #[inline] - fn unsafe_well_ordered_double_lock_self(&'a self) -> RwLockWriteGuard { self.write().unwrap() } + fn unsafe_well_ordered_double_lock_self(&'a self) -> RwLockWriteGuard { + self.write().unwrap() + } } } -- 2.39.5