From f66f720fa54cdd28ac998dcc39c859567b2455e0 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 10 Jan 2023 06:26:46 +0000 Subject: [PATCH] Move `no-std` sync implementations to a folder to clean up --- lightning/src/lib.rs | 11 ----------- lightning/src/sync/mod.rs | 11 +++++++++++ lightning/src/{sync.rs => sync/nostd_sync.rs} | 0 3 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 lightning/src/sync/mod.rs rename lightning/src/{sync.rs => sync/nostd_sync.rs} (100%) diff --git a/lightning/src/lib.rs b/lightning/src/lib.rs index 1f3ab47b1..1ec4d6aa5 100644 --- a/lightning/src/lib.rs +++ b/lightning/src/lib.rs @@ -180,15 +180,4 @@ mod debug_sync; #[cfg(all(not(feature = "_bench_unstable"), feature = "backtrace", feature = "std", test))] extern crate backtrace; -#[cfg(feature = "std")] -mod sync { - #[cfg(all(not(feature = "_bench_unstable"), test))] - pub use crate::debug_sync::*; - #[cfg(any(feature = "_bench_unstable", not(test)))] - pub use ::std::sync::{Arc, Mutex, Condvar, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard}; - #[cfg(any(feature = "_bench_unstable", not(test)))] - pub use crate::util::fairrwlock::FairRwLock; -} - -#[cfg(not(feature = "std"))] mod sync; diff --git a/lightning/src/sync/mod.rs b/lightning/src/sync/mod.rs new file mode 100644 index 000000000..584338031 --- /dev/null +++ b/lightning/src/sync/mod.rs @@ -0,0 +1,11 @@ +#[cfg(all(feature = "std", not(feature = "_bench_unstable"), test))] +pub use crate::debug_sync::*; +#[cfg(all(feature = "std", any(feature = "_bench_unstable", not(test))))] +pub use ::std::sync::{Arc, Mutex, Condvar, MutexGuard, RwLock, RwLockReadGuard, RwLockWriteGuard}; +#[cfg(all(feature = "std", any(feature = "_bench_unstable", not(test))))] +pub use crate::util::fairrwlock::FairRwLock; + +#[cfg(not(feature = "std"))] +mod nostd_sync; +#[cfg(not(feature = "std"))] +pub use nostd_sync::*; diff --git a/lightning/src/sync.rs b/lightning/src/sync/nostd_sync.rs similarity index 100% rename from lightning/src/sync.rs rename to lightning/src/sync/nostd_sync.rs -- 2.39.5