X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=lightning%2Fsrc%2Flib.rs;h=c84e3d2d8da24aaeb826cc2e258410d4c7c79c67;hb=7fa6a7d48e5cec139481ceee95baadb2cf06486e;hp=9bf9470458f8310f005788769d781b74055fd835;hpb=8088e4ba1505c026ac91f8c1489fb7d53d6b656e;p=rust-lightning diff --git a/lightning/src/lib.rs b/lightning/src/lib.rs index 9bf94704..c84e3d2d 100644 --- a/lightning/src/lib.rs +++ b/lightning/src/lib.rs @@ -31,7 +31,9 @@ #![cfg_attr(all(any(test, feature = "_test_utils"), feature = "unstable"), feature(test))] #[cfg(all(any(test, feature = "_test_utils"), feature = "unstable"))] extern crate test; +extern crate alloc; extern crate bitcoin; +extern crate core; #[cfg(any(test, feature = "_test_utils"))] extern crate hex; #[cfg(any(test, feature = "fuzztarget", feature = "_test_utils"))] extern crate regex; @@ -40,3 +42,14 @@ pub mod util; pub mod chain; pub mod ln; pub mod routing; + +mod prelude { + #[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}; +}