Merge rust-bitcoin/rust-bitcoin#4592: Remove unnecessary closure

a1e8fabbbe 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 #4586).

  Internal change only, no logic change.

ACKs for top commit:
  yancyribbens:
    cr ACK a1e8fabbbe
  apoelstra:
    ACK a1e8fabbbe26cbe62e1a966cc0c760407bfb063f; successfully ran local tests

Tree-SHA512: 19d5ee65da7cfdae82a9a6609afac6d6b03d1c44c0c5bed21916ec31665e76adfc836ac6a1980251db2b9d5704baa577783dc967b1f0035cf662389c87fc6a0a
This commit is contained in:
merge-script 2025-06-04 21:00:30 +00:00
commit 4213d4a9d3
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 1 additions and 3 deletions

View File

@ -187,9 +187,7 @@ impl Serialize for Vec<secp256k1::PublicKey> {
impl Deserialize for Vec<secp256k1::PublicKey> {
fn deserialize(bytes: &[u8]) -> Result<Self, Error> {
bytes.chunks(secp256k1::constants::PUBLIC_KEY_SIZE)
.map(|pubkey_bytes| {
secp256k1::PublicKey::deserialize(pubkey_bytes)
})
.map(secp256k1::PublicKey::deserialize)
.collect()
}
}