Skip to content

Commit 4110176

Browse files
committed
f no need to borrow deref
1 parent 8c02797 commit 4110176

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lightning/src/util/persist.rs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ where
402402
/// [`io::ErrorKind::NotFound`] variant correctly. For more information, please see the
403403
/// documentation for [`MonitorUpdatingPersister`].
404404
pub fn read_all_channel_monitors_with_updates<B: Deref, F: Deref + Clone>(
405-
&self, broadcaster: &B, fee_estimator: F,
405+
&self, broadcaster: B, fee_estimator: F,
406406
) -> io::Result<Vec<(BlockHash, ChannelMonitor<<SP::Target as SignerProvider>::Signer>)>>
407407
where
408408
ES::Target: EntropySource + Sized,
@@ -417,7 +417,7 @@ where
417417
let mut res = Vec::with_capacity(monitor_list.len());
418418
for monitor_key in monitor_list {
419419
res.push(self.read_channel_monitor_with_updates(
420-
broadcaster,
420+
&broadcaster,
421421
&fee_estimator,
422422
monitor_key,
423423
)?)
@@ -434,7 +434,7 @@ where
434434
/// Loading a large number of monitors will be faster if done in parallel. You can use this
435435
/// function to accomplish this. Take care to limit the number of parallel readers.
436436
pub fn read_channel_monitor_with_updates<B: Deref, F: Deref + Clone>(
437-
&self, broadcaster: &B, fee_estimator: &F, monitor_key: String,
437+
&self, broadcaster: B, fee_estimator: F, monitor_key: String,
438438
) -> io::Result<(BlockHash, ChannelMonitor<<SP::Target as SignerProvider>::Signer>)>
439439
where
440440
ES::Target: EntropySource + Sized,
@@ -460,8 +460,7 @@ where
460460
Err(err) => return Err(err),
461461
};
462462

463-
monitor
464-
.update_monitor(&update, broadcaster, fee_estimator.clone(), &self.logger)
463+
monitor.update_monitor(&update, &broadcaster, fee_estimator.clone(), &self.logger)
465464
.map_err(|e| {
466465
log_error!(
467466
self.logger,
@@ -711,8 +710,8 @@ where
711710
&self, funding_txo: OutPoint, update: Option<&ChannelMonitorUpdate>,
712711
monitor: &ChannelMonitor<ChannelSigner>, monitor_update_call_id: MonitorUpdateId,
713712
) -> chain::ChannelMonitorUpdateStatus {
714-
// IMPORTANT: monitor_update_call_id: [`MonitorUpdateId`] is not to be confused with
715-
// [`ChannelMonitorUpdate`]'s update_id.
713+
// IMPORTANT: monitor_update_call_id: MonitorUpdateId is not to be confused with
714+
// ChannelMonitorUpdate's update_id.
716715
if let Some(update) = update {
717716
if update.update_id != CLOSED_CHANNEL_UPDATE_ID
718717
&& update.update_id % self.maximum_pending_updates != 0

0 commit comments

Comments
 (0)