From d5e316f5a0e7a7996cd42d71946231bbd580b0ac Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 29 Jul 2018 13:29:36 -0400 Subject: [PATCH] Remove some excess mut's 1.22 complains about --- src/ln/channel.rs | 2 +- src/ln/channelmanager.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ln/channel.rs b/src/ln/channel.rs index fc6708525..6fdc1462a 100644 --- a/src/ln/channel.rs +++ b/src/ln/channel.rs @@ -985,7 +985,7 @@ impl Channel { } let htlc_id = { - let mut htlc = &mut self.pending_htlcs[pending_idx]; + let htlc = &mut self.pending_htlcs[pending_idx]; if htlc.state == HTLCState::Committed { htlc.state = HTLCState::LocalRemoved; htlc.local_removed_fulfilled = true; diff --git a/src/ln/channelmanager.rs b/src/ln/channelmanager.rs index 1e3021bf0..e4e05afd4 100644 --- a/src/ln/channelmanager.rs +++ b/src/ln/channelmanager.rs @@ -388,7 +388,7 @@ impl ChannelManager { let mut chan = { let mut channel_state_lock = self.channel_state.lock().unwrap(); let channel_state = channel_state_lock.borrow_parts(); - if let Some(mut chan) = channel_state.by_id.remove(channel_id) { + if let Some(chan) = channel_state.by_id.remove(channel_id) { if let Some(short_id) = chan.get_short_channel_id() { channel_state.short_to_id.remove(&short_id); } -- 2.39.5