Skip to content

Commit 9109984

Browse files
authored
fix clippy warnings (#439)
fix clippy
1 parent 24265ac commit 9109984

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

p2p/address-book/src/store.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,7 @@ pub(crate) fn save_peers_to_disk<Z: BorshNetworkZone>(
4646

4747
spawn_blocking(move || {
4848
fs::create_dir_all(dir)?;
49-
match fs::write(&tmp_file, &data) {
50-
Ok(_) => fs::rename(tmp_file, file),
51-
Err(x) => Err(x),
52-
}
49+
fs::write(&tmp_file, &data).and_then(|()| fs::rename(tmp_file, file))
5350
})
5451
}
5552

0 commit comments

Comments
 (0)