From: Matt Corallo Date: Sun, 29 Jul 2018 17:29:36 +0000 (-0400) Subject: Remove some excess mut's 1.22 complains about X-Git-Tag: v0.0.12~358^2~3 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=d5e316f5a0e7a7996cd42d71946231bbd580b0ac;p=rust-lightning Remove some excess mut's 1.22 complains about --- 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); }