]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Remove some excess mut's 1.22 complains about
authorMatt Corallo <git@bluematt.me>
Sun, 29 Jul 2018 17:29:36 +0000 (13:29 -0400)
committerMatt Corallo <git@bluematt.me>
Sun, 29 Jul 2018 17:30:04 +0000 (13:30 -0400)
src/ln/channel.rs
src/ln/channelmanager.rs

index fc67085250a3e1f429d53dcffa06f7ff3455a0d9..6fdc1462a419b2885c8a125986d64cfde94d86a7 100644 (file)
@@ -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;
index 1e3021bf09bc5da4ce2cdddf246b5db6ea3899b4..e4e05afd44f30b7009c414c89ae85b0851908663 100644 (file)
@@ -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);
                                }