Move no-std sync implementations to a folder to clean up

This commit is contained in:
Matt Corallo 2023-01-10 06:26:46 +00:00
parent 197a47a8f3
commit f66f720fa5
3 changed files with 11 additions and 11 deletions

View file

@ -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;

11
lightning/src/sync/mod.rs Normal file
View file

@ -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::*;