Collect all lightning std::sync imports under crate::sync
[rust-lightning] / lightning / src / lib.rs
index a9f46b43a4026f650069cb97f9baf1dd62a0d968..1088063540c97f51e03d0bcebbcde1773fb83970 100644 (file)
@@ -44,5 +44,16 @@ pub mod ln;
 pub mod routing;
 
 mod prelude {
-       pub use alloc::{vec, vec::Vec, string::String};
-}
\ No newline at end of file
+       #[cfg(feature = "hashbrown")]
+       extern crate hashbrown;
+
+       pub use alloc::{vec, vec::Vec, string::String, collections::VecDeque};
+       #[cfg(not(feature = "hashbrown"))]
+       pub use std::collections::{HashMap, HashSet, hash_map};
+       #[cfg(feature = "hashbrown")]
+       pub use self::hashbrown::{HashMap, HashSet, hash_map};
+}
+
+mod sync {
+       pub use ::std::sync::{Arc, Mutex, Condvar, MutexGuard, RwLock, RwLockReadGuard};
+}