diff --git a/lightning/src/chain/channelmonitor.rs b/lightning/src/chain/channelmonitor.rs index 37c3383a3ad..2b47a02e4e0 100644 --- a/lightning/src/chain/channelmonitor.rs +++ b/lightning/src/chain/channelmonitor.rs @@ -2229,7 +2229,7 @@ macro_rules! fail_unbroadcast_htlcs { // broadcastable commitment transaction has the HTLC in it, but it // cannot currently change after channel initialization, so we don't // need to here. - let confirmed_htlcs_iter: &mut Iterator)> = &mut $confirmed_htlcs_list; + let confirmed_htlcs_iter: &mut dyn Iterator)> = &mut $confirmed_htlcs_list; let mut matched_htlc = false; for (ref broadcast_htlc, ref broadcast_source) in confirmed_htlcs_iter { diff --git a/lightning/src/chain/mod.rs b/lightning/src/chain/mod.rs index 89e0b155cf6..44a3b5fdff1 100644 --- a/lightning/src/chain/mod.rs +++ b/lightning/src/chain/mod.rs @@ -357,7 +357,7 @@ pub struct WatchedOutput { pub script_pubkey: Script, } -impl Listen for core::ops::Deref { +impl Listen for dyn core::ops::Deref { fn filtered_block_connected(&self, header: &BlockHeader, txdata: &TransactionData, height: u32) { (**self).filtered_block_connected(header, txdata, height); } diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs index 33de30a4b84..a064f9b9ed5 100644 --- a/lightning/src/ln/channel.rs +++ b/lightning/src/ln/channel.rs @@ -5014,7 +5014,7 @@ impl Channel where // larger. If we don't know that time has moved forward, we can just set it to the last // time we saw and it will be ignored. let best_time = self.context.update_time_counter; - match self.do_best_block_updated(reorg_height, best_time, None::<(ChainHash, &&NodeSigner, &UserConfig)>, logger) { + match self.do_best_block_updated(reorg_height, best_time, None::<(ChainHash, &&dyn NodeSigner, &UserConfig)>, logger) { Ok((channel_ready, timed_out_htlcs, announcement_sigs)) => { assert!(channel_ready.is_none(), "We can't generate a funding with 0 confirmations?"); assert!(timed_out_htlcs.is_empty(), "We can't have accepted HTLCs with a timeout before our funding confirmation?"); diff --git a/lightning/src/util/logger.rs b/lightning/src/util/logger.rs index dbca9b785e8..6ec17a9f3f8 100644 --- a/lightning/src/util/logger.rs +++ b/lightning/src/util/logger.rs @@ -203,11 +203,11 @@ mod tests { } struct WrapperLog { - logger: Arc + logger: Arc } impl WrapperLog { - fn new(logger: Arc) -> WrapperLog { + fn new(logger: Arc) -> WrapperLog { WrapperLog { logger, } @@ -227,7 +227,7 @@ mod tests { fn test_logging_macros() { let mut logger = TestLogger::new(); logger.enable(Level::Gossip); - let logger : Arc = Arc::new(logger); + let logger : Arc = Arc::new(logger); let wrapper = WrapperLog::new(Arc::clone(&logger)); wrapper.call_macros(); } diff --git a/lightning/src/util/test_utils.rs b/lightning/src/util/test_utils.rs index d42a84d361d..4b47907afbf 100644 --- a/lightning/src/util/test_utils.rs +++ b/lightning/src/util/test_utils.rs @@ -206,7 +206,7 @@ pub struct TestChainMonitor<'a> { pub added_monitors: Mutex)>>, pub monitor_updates: Mutex>>, pub latest_monitor_update_id: Mutex>, - pub chain_monitor: chainmonitor::ChainMonitor>, + pub chain_monitor: chainmonitor::ChainMonitor>, pub keys_manager: &'a TestKeysInterface, /// If this is set to Some(), the next update_channel call (not watch_channel) must be a /// ChannelForceClosed event for the given channel_id with should_broadcast set to the given @@ -217,7 +217,7 @@ pub struct TestChainMonitor<'a> { pub expect_monitor_round_trip_fail: Mutex>, } impl<'a> TestChainMonitor<'a> { - pub fn new(chain_source: Option<&'a TestChainSource>, broadcaster: &'a chaininterface::BroadcasterInterface, logger: &'a TestLogger, fee_estimator: &'a TestFeeEstimator, persister: &'a chainmonitor::Persist, keys_manager: &'a TestKeysInterface) -> Self { + pub fn new(chain_source: Option<&'a TestChainSource>, broadcaster: &'a dyn chaininterface::BroadcasterInterface, logger: &'a TestLogger, fee_estimator: &'a TestFeeEstimator, persister: &'a dyn chainmonitor::Persist, keys_manager: &'a TestKeysInterface) -> Self { Self { added_monitors: Mutex::new(Vec::new()), monitor_updates: Mutex::new(HashMap::new()),