X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-invoice%2Fsrc%2Flib.rs;h=d87c6c89372080b5696fd754f35fb8eeddf1c75d;hb=c7f19bef249ad28bf0adc1ef1ec89d86468841da;hp=a5ebf466f8c334e581fa7c25a56e078df9abc184;hpb=ec928d55b480254f2ce3457a5c219ed115fdf9ef;p=rust-lightning diff --git a/lightning-invoice/src/lib.rs b/lightning-invoice/src/lib.rs index a5ebf466f..d87c6c893 100644 --- a/lightning-invoice/src/lib.rs +++ b/lightning-invoice/src/lib.rs @@ -83,9 +83,9 @@ mod prelude { #[cfg(feature = "hashbrown")] extern crate hashbrown; - pub use alloc::{vec, vec::Vec, string::String, collections::VecDeque, boxed::Box}; + pub use alloc::{vec, vec::Vec, string::String}; #[cfg(not(feature = "hashbrown"))] - pub use std::collections::{HashMap, HashSet, hash_map}; + pub use std::collections::{HashMap, hash_map}; #[cfg(feature = "hashbrown")] pub use self::hashbrown::{HashMap, HashSet, hash_map}; @@ -94,12 +94,6 @@ mod prelude { use crate::prelude::*; -/// Sync compat for std/no_std -#[cfg(feature = "std")] -mod sync { - pub use ::std::sync::{Mutex, MutexGuard}; -} - /// Sync compat for std/no_std #[cfg(not(feature = "std"))] mod sync; @@ -413,7 +407,10 @@ impl From for Currency { Network::Testnet => Currency::BitcoinTestnet, Network::Regtest => Currency::Regtest, Network::Signet => Currency::Signet, - _ => unreachable!(), + _ => { + debug_assert!(false, "Need to handle new rust-bitcoin network type"); + Currency::Regtest + }, } } }