]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Remove nightly warnings
authorWilmer Paulino <wilmer@wilmerpaulino.com>
Tue, 21 Nov 2023 01:05:52 +0000 (17:05 -0800)
committerWilmer Paulino <wilmer@wilmerpaulino.com>
Wed, 22 Nov 2023 23:58:01 +0000 (15:58 -0800)
lightning-invoice/src/lib.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/payment_tests.rs
lightning/src/ln/reload_tests.rs

index a5ebf466f8c334e581fa7c25a56e078df9abc184..d30fb638d340eea056ce3a7b83a92c713bcf30ec 100644 (file)
@@ -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;
index 077f8bc155b0c0bbb6691d45761d18c607721480..c40ab4858b1a68921999ca7bddb44ee663d64c07 100644 (file)
@@ -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();
index 87952a1bbdf50dc3af6d8f18b722dff15ccf7d13..a5654b30f65db4a3d2d89d9b7d37a8420d6f5040 100644 (file)
@@ -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::<Vec<_>>();
        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();
 
index ade396fbebff5e1f899e51b26ad15af7aa3ff9cb..052e3eb6e5d98eaace5bd39b71061bd0cc3b6b63 100644 (file)
@@ -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();