X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Flib.rs;h=14445710655b277f32eaeb1033a475b3b3c53c9e;hb=a0a3a6b204395a63647a7914f35077b117315b1d;hp=a9f46b43a4026f650069cb97f9baf1dd62a0d968;hpb=c05347f48a4ff2789ae261ee8c8f3f4277489420;p=rust-lightning diff --git a/lightning/src/lib.rs b/lightning/src/lib.rs index a9f46b43..14445710 100644 --- a/lightning/src/lib.rs +++ b/lightning/src/lib.rs @@ -44,5 +44,20 @@ 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}; +} + +#[cfg(feature = "std")] +mod sync { + pub use ::std::sync::{Arc, Mutex, Condvar, MutexGuard, RwLock, RwLockReadGuard}; +} + +#[cfg(not(feature = "std"))] +mod sync;