Skip to content

Commit 4213d4a

Browse files
committed
Merge rust-bitcoin#4592: Remove unnecessary closure
a1e8fab Remove unnecessary closure (Tobin C. Harding) Pull request description: 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. ACKs for top commit: yancyribbens: cr ACK a1e8fab apoelstra: ACK a1e8fab; successfully ran local tests Tree-SHA512: 19d5ee65da7cfdae82a9a6609afac6d6b03d1c44c0c5bed21916ec31665e76adfc836ac6a1980251db2b9d5704baa577783dc967b1f0035cf662389c87fc6a0a
2 parents a746456 + a1e8fab commit 4213d4a

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)