Skip to content

Commit d51753d

Browse files
committed
f Fix disallowed bare trait objects
1 parent a475cd1 commit d51753d

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2229,7 +2229,7 @@ macro_rules! fail_unbroadcast_htlcs {
22292229
// broadcastable commitment transaction has the HTLC in it, but it
22302230
// cannot currently change after channel initialization, so we don't
22312231
// need to here.
2232-
let confirmed_htlcs_iter: &mut Iterator<Item = (&HTLCOutputInCommitment, Option<&HTLCSource>)> = &mut $confirmed_htlcs_list;
2232+
let confirmed_htlcs_iter: &mut dyn Iterator<Item = (&HTLCOutputInCommitment, Option<&HTLCSource>)> = &mut $confirmed_htlcs_list;
22332233

22342234
let mut matched_htlc = false;
22352235
for (ref broadcast_htlc, ref broadcast_source) in confirmed_htlcs_iter {

lightning/src/chain/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ pub struct WatchedOutput {
357357
pub script_pubkey: Script,
358358
}
359359

360-
impl<T: Listen> Listen for core::ops::Deref<Target = T> {
360+
impl<T: Listen> Listen for dyn core::ops::Deref<Target = T> {
361361
fn filtered_block_connected(&self, header: &BlockHeader, txdata: &TransactionData, height: u32) {
362362
(**self).filtered_block_connected(header, txdata, height);
363363
}

lightning/src/ln/channel.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5014,7 +5014,7 @@ impl<SP: Deref> Channel<SP> where
50145014
// larger. If we don't know that time has moved forward, we can just set it to the last
50155015
// time we saw and it will be ignored.
50165016
let best_time = self.context.update_time_counter;
5017-
match self.do_best_block_updated(reorg_height, best_time, None::<(ChainHash, &&NodeSigner, &UserConfig)>, logger) {
5017+
match self.do_best_block_updated(reorg_height, best_time, None::<(ChainHash, &&dyn NodeSigner, &UserConfig)>, logger) {
50185018
Ok((channel_ready, timed_out_htlcs, announcement_sigs)) => {
50195019
assert!(channel_ready.is_none(), "We can't generate a funding with 0 confirmations?");
50205020
assert!(timed_out_htlcs.is_empty(), "We can't have accepted HTLCs with a timeout before our funding confirmation?");

lightning/src/util/logger.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,11 @@ mod tests {
203203
}
204204

205205
struct WrapperLog {
206-
logger: Arc<Logger>
206+
logger: Arc<dyn Logger>
207207
}
208208

209209
impl WrapperLog {
210-
fn new(logger: Arc<Logger>) -> WrapperLog {
210+
fn new(logger: Arc<dyn Logger>) -> WrapperLog {
211211
WrapperLog {
212212
logger,
213213
}
@@ -227,7 +227,7 @@ mod tests {
227227
fn test_logging_macros() {
228228
let mut logger = TestLogger::new();
229229
logger.enable(Level::Gossip);
230-
let logger : Arc<Logger> = Arc::new(logger);
230+
let logger : Arc<dyn Logger> = Arc::new(logger);
231231
let wrapper = WrapperLog::new(Arc::clone(&logger));
232232
wrapper.call_macros();
233233
}

lightning/src/util/test_utils.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ pub struct TestChainMonitor<'a> {
206206
pub added_monitors: Mutex<Vec<(OutPoint, channelmonitor::ChannelMonitor<TestChannelSigner>)>>,
207207
pub monitor_updates: Mutex<HashMap<ChannelId, Vec<channelmonitor::ChannelMonitorUpdate>>>,
208208
pub latest_monitor_update_id: Mutex<HashMap<ChannelId, (OutPoint, u64, MonitorUpdateId)>>,
209-
pub chain_monitor: chainmonitor::ChainMonitor<TestChannelSigner, &'a TestChainSource, &'a chaininterface::BroadcasterInterface, &'a TestFeeEstimator, &'a TestLogger, &'a chainmonitor::Persist<TestChannelSigner>>,
209+
pub chain_monitor: chainmonitor::ChainMonitor<TestChannelSigner, &'a TestChainSource, &'a dyn chaininterface::BroadcasterInterface, &'a TestFeeEstimator, &'a TestLogger, &'a dyn chainmonitor::Persist<TestChannelSigner>>,
210210
pub keys_manager: &'a TestKeysInterface,
211211
/// If this is set to Some(), the next update_channel call (not watch_channel) must be a
212212
/// ChannelForceClosed event for the given channel_id with should_broadcast set to the given
@@ -217,7 +217,7 @@ pub struct TestChainMonitor<'a> {
217217
pub expect_monitor_round_trip_fail: Mutex<Option<ChannelId>>,
218218
}
219219
impl<'a> TestChainMonitor<'a> {
220-
pub fn new(chain_source: Option<&'a TestChainSource>, broadcaster: &'a chaininterface::BroadcasterInterface, logger: &'a TestLogger, fee_estimator: &'a TestFeeEstimator, persister: &'a chainmonitor::Persist<TestChannelSigner>, keys_manager: &'a TestKeysInterface) -> Self {
220+
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<TestChannelSigner>, keys_manager: &'a TestKeysInterface) -> Self {
221221
Self {
222222
added_monitors: Mutex::new(Vec::new()),
223223
monitor_updates: Mutex::new(HashMap::new()),

0 commit comments

Comments
 (0)