From 9422370dd2b2ec73115b5950fa5e19db51c8ea73 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 7 Feb 2023 19:39:24 +0000 Subject: [PATCH] Move `fairrwlock` to the `sync` module --- lightning/src/{util => sync}/fairrwlock.rs | 0 lightning/src/sync/mod.rs | 4 ++-- lightning/src/util/mod.rs | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) rename lightning/src/{util => sync}/fairrwlock.rs (100%) diff --git a/lightning/src/util/fairrwlock.rs b/lightning/src/sync/fairrwlock.rs similarity index 100% rename from lightning/src/util/fairrwlock.rs rename to lightning/src/sync/fairrwlock.rs diff --git a/lightning/src/sync/mod.rs b/lightning/src/sync/mod.rs index f7226a5fa..5b0cc9c18 100644 --- a/lightning/src/sync/mod.rs +++ b/lightning/src/sync/mod.rs @@ -7,9 +7,9 @@ pub use debug_sync::*; mod test_lockorder_checks; #[cfg(all(feature = "std", any(feature = "_bench_unstable", not(test))))] -pub use ::std::sync::{Arc, Mutex, Condvar, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard}; +pub(crate) mod fairrwlock; #[cfg(all(feature = "std", any(feature = "_bench_unstable", not(test))))] -pub use crate::util::fairrwlock::FairRwLock; +pub use {std::sync::{Arc, Mutex, Condvar, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard}, fairrwlock::FairRwLock}; #[cfg(not(feature = "std"))] mod nostd_sync; diff --git a/lightning/src/util/mod.rs b/lightning/src/util/mod.rs index 1673bd07f..7bcbc5a41 100644 --- a/lightning/src/util/mod.rs +++ b/lightning/src/util/mod.rs @@ -27,8 +27,6 @@ pub mod wakers; pub(crate) mod atomic_counter; pub(crate) mod byte_utils; pub(crate) mod chacha20; -#[cfg(all(any(feature = "_bench_unstable", not(test)), feature = "std"))] -pub(crate) mod fairrwlock; #[cfg(fuzzing)] pub mod zbase32; #[cfg(not(fuzzing))] -- 2.39.5