Skip to content

Commit a1e8fab

Browse files
committed
Remove unnecessary closure
We can just pass the function directly. Found by clippy bizarrely after running `rustfmt` (in bot-created PR rust-bitcoin#4586). Internal change only, no logic change.
1 parent a419fc9 commit a1e8fab

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

bitcoin/src/psbt/serialize.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,7 @@ impl Serialize for Vec<secp256k1::PublicKey> {
187187
impl Deserialize for Vec<secp256k1::PublicKey> {
188188
fn deserialize(bytes: &[u8]) -> Result<Self, Error> {
189189
bytes.chunks(secp256k1::constants::PUBLIC_KEY_SIZE)
190-
.map(|pubkey_bytes| {
191-
secp256k1::PublicKey::deserialize(pubkey_bytes)
192-
})
190+
.map(secp256k1::PublicKey::deserialize)
193191
.collect()
194192
}
195193
}

0 commit comments

Comments
 (0)