Fix broken doc link in create_refund_builder
[rust-lightning] / lightning-invoice / src / lib.rs
index a5ebf466f8c334e581fa7c25a56e078df9abc184..89763aa758915dff924fd6155604f5a27f308bcf 100644 (file)
@@ -1,6 +1,5 @@
-// Prefix these with `rustdoc::` when we update our MSRV to be >= 1.52 to remove warnings.
-#![deny(broken_intra_doc_links)]
-#![deny(private_intra_doc_links)]
+#![deny(rustdoc::broken_intra_doc_links)]
+#![deny(rustdoc::private_intra_doc_links)]
 
 #![deny(missing_docs)]
 #![deny(non_upper_case_globals)]
@@ -83,9 +82,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 +93,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 +406,10 @@ impl From<Network> 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
+                       },
                }
        }
 }