Skip to content

Commit 2be3e8b

Browse files
committed
f chanmon skip mut
1 parent 3ea6ea9 commit 2be3e8b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lightning/src/chain/channelmonitor.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2735,10 +2735,11 @@ impl<'a, Signer: Sign, K: KeysInterface<Signer = Signer>> ReadableArgs<&'a K>
27352735
let mut secp_ctx = Secp256k1::new();
27362736
secp_ctx.seeded_randomize(&keys_manager.get_secure_random_bytes());
27372737

2738-
let mut last_seen_block_hash = Some(last_block_hash.clone());
2739-
if last_block_hash == Default::default() {
2740-
last_seen_block_hash = None;
2741-
}
2738+
let last_seen_block_hash = if last_block_hash == Default::default() {
2739+
None
2740+
} else {
2741+
Some(last_block_hash)
2742+
};
27422743

27432744
Ok((last_seen_block_hash, ChannelMonitor {
27442745
inner: Mutex::new(ChannelMonitorImpl {

0 commit comments

Comments
 (0)