From: Wilmer Paulino Date: Tue, 21 Nov 2023 01:05:52 +0000 (-0800) Subject: Remove nightly warnings X-Git-Tag: v0.0.119~47^2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=ad56847a6b31864aac290d72d7ddb0908acf98c7;p=rust-lightning Remove nightly warnings --- diff --git a/lightning-invoice/src/lib.rs b/lightning-invoice/src/lib.rs index a5ebf466f..d30fb638d 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; diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index 077f8bc15..c40ab4858 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -11416,7 +11416,7 @@ mod tests { let _chan = create_chan_between_nodes(&nodes[0], &nodes[1]); let route_params = RouteParameters::from_payment_params_and_value( PaymentParameters::for_keysend(payee_pubkey, 40, false), 10_000); - let network_graph = nodes[0].network_graph.clone(); + let network_graph = nodes[0].network_graph; let first_hops = nodes[0].node.list_usable_channels(); let scorer = test_utils::TestScorer::new(); let random_seed_bytes = chanmon_cfgs[1].keys_manager.get_secure_random_bytes(); @@ -11461,7 +11461,7 @@ mod tests { let _chan = create_chan_between_nodes(&nodes[0], &nodes[1]); let route_params = RouteParameters::from_payment_params_and_value( PaymentParameters::for_keysend(payee_pubkey, 40, false), 10_000); - let network_graph = nodes[0].network_graph.clone(); + let network_graph = nodes[0].network_graph; let first_hops = nodes[0].node.list_usable_channels(); let scorer = test_utils::TestScorer::new(); let random_seed_bytes = chanmon_cfgs[1].keys_manager.get_secure_random_bytes(); diff --git a/lightning/src/ln/payment_tests.rs b/lightning/src/ln/payment_tests.rs index 87952a1bb..a5654b30f 100644 --- a/lightning/src/ln/payment_tests.rs +++ b/lightning/src/ln/payment_tests.rs @@ -377,7 +377,7 @@ fn do_test_keysend_payments(public_node: bool, with_retry: bool) { let route_params = RouteParameters::from_payment_params_and_value( PaymentParameters::for_keysend(payee_pubkey, 40, false), 10000); - let network_graph = nodes[0].network_graph.clone(); + let network_graph = nodes[0].network_graph; let channels = nodes[0].node.list_usable_channels(); let first_hops = channels.iter().collect::>(); let first_hops = if public_node { None } else { Some(first_hops.as_slice()) }; @@ -429,7 +429,7 @@ fn test_mpp_keysend() { create_announced_chan_between_nodes(&nodes, 0, 2); create_announced_chan_between_nodes(&nodes, 1, 3); create_announced_chan_between_nodes(&nodes, 2, 3); - let network_graph = nodes[0].network_graph.clone(); + let network_graph = nodes[0].network_graph; let payer_pubkey = nodes[0].node.get_our_node_id(); let payee_pubkey = nodes[3].node.get_our_node_id(); @@ -1279,7 +1279,7 @@ fn successful_probe_yields_event() { create_announced_chan_between_nodes(&nodes, 1, 2); let recv_value = 100_000; - let (route, payment_hash, _, _) = get_route_and_payment_hash!(&nodes[0], nodes[2], recv_value); + let (route, _, _, _) = get_route_and_payment_hash!(&nodes[0], nodes[2], recv_value); let res = nodes[0].node.send_probe(route.paths[0].clone()).unwrap(); diff --git a/lightning/src/ln/reload_tests.rs b/lightning/src/ln/reload_tests.rs index ade396fbe..052e3eb6e 100644 --- a/lightning/src/ln/reload_tests.rs +++ b/lightning/src/ln/reload_tests.rs @@ -422,7 +422,7 @@ fn test_manager_serialize_deserialize_inconsistent_monitor() { fee_estimator: &fee_estimator, router: &nodes[0].router, chain_monitor: nodes[0].chain_monitor, - tx_broadcaster: nodes[0].tx_broadcaster.clone(), + tx_broadcaster: nodes[0].tx_broadcaster, logger: &logger, channel_monitors: node_0_stale_monitors.iter_mut().map(|monitor| { (monitor.get_funding_txo().0, monitor) }).collect(), }) { } else { @@ -439,7 +439,7 @@ fn test_manager_serialize_deserialize_inconsistent_monitor() { fee_estimator: &fee_estimator, router: nodes[0].router, chain_monitor: nodes[0].chain_monitor, - tx_broadcaster: nodes[0].tx_broadcaster.clone(), + tx_broadcaster: nodes[0].tx_broadcaster, logger: &logger, channel_monitors: node_0_monitors.iter_mut().map(|monitor| { (monitor.get_funding_txo().0, monitor) }).collect(), }).unwrap();