Use hashbrown replacements for std equivalents
[rust-lightning] / lightning / src / lib.rs
index a9f46b43a4026f650069cb97f9baf1dd62a0d968..c84e3d2d8da24aaeb826cc2e258410d4c7c79c67 100644 (file)
@@ -44,5 +44,12 @@ 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};
+}