diff options
-rw-r--r-- | ipc/src/keybox.rs | 6 | ||||
-rw-r--r-- | net/src/updates.rs | 8 | ||||
-rw-r--r-- | openpgp-ffi/src/parse/stream.rs | 1 |
3 files changed, 8 insertions, 7 deletions
diff --git a/ipc/src/keybox.rs b/ipc/src/keybox.rs index 7ed481b7..c098631d 100644 --- a/ipc/src/keybox.rs +++ b/ipc/src/keybox.rs @@ -162,13 +162,13 @@ impl KeyboxRecord { let record = KeyboxRecord::Unknown(bytes.clone()); match record.typ() { KeyboxRecordType::Header => { - HeaderRecord::new(bytes).map(|r| KeyboxRecord::Header(r)) + HeaderRecord::new(bytes).map(KeyboxRecord::Header) } KeyboxRecordType::OpenPGP => { - OpenPGPRecordV1::new(&record).map(|r| KeyboxRecord::OpenPGP(r)) + OpenPGPRecordV1::new(&record).map(KeyboxRecord::OpenPGP) } KeyboxRecordType::X509 => { - X509Record::new(bytes).map(|r| KeyboxRecord::X509(r)) + X509Record::new(bytes).map(KeyboxRecord::X509) } KeyboxRecordType::Unknown(_) => Ok(record), } diff --git a/net/src/updates.rs b/net/src/updates.rs index f4ff91dc..8313cd62 100644 --- a/net/src/updates.rs +++ b/net/src/updates.rs @@ -79,7 +79,7 @@ impl Manifest { /// Iterates over all epochs contained in this Update Manifest. pub fn epochs(&self) -> impl Iterator<Item = Epoch> { (self.start.0..self.end.0 + 1).into_iter() - .map(|n| Epoch(n)) + .map(Epoch) } /// Returns the start epoch. @@ -218,12 +218,12 @@ impl Epoch { /// Returns the previous Epoch, if any. pub fn pred(&self) -> Option<Epoch> { - self.0.checked_sub(1).map(|e| Epoch(e)) + self.0.checked_sub(1).map(Epoch) } /// Returns the next Epoch, if any. pub fn succ(&self) -> Option<Epoch> { - self.0.checked_add(1).map(|e| Epoch(e)) + self.0.checked_add(1).map(Epoch) } /// Returns an iterator over all epochs starting from this one to @@ -231,7 +231,7 @@ impl Epoch { pub fn since(&self, other: Epoch) -> anyhow::Result<impl Iterator<Item = Epoch>> { if other <= *self { - Ok((other.0 + 1..self.0).into_iter().rev().map(|e| Epoch(e))) + Ok((other.0 + 1..self.0).into_iter().rev().map(Epoch)) } else { Err(anyhow::anyhow!("other is later than self")) } diff --git a/openpgp-ffi/src/parse/stream.rs b/openpgp-ffi/src/parse/stream.rs index 62ba4b1e..afd32fee 100644 --- a/openpgp-ffi/src/parse/stream.rs +++ b/openpgp-ffi/src/parse/stream.rs @@ -494,6 +494,7 @@ impl VerificationHelper for VHelper { &mut free); // Free the KeyID wrappers. + #[allow(clippy::redundant_closure)] ids.into_iter().for_each(|id| super::super::keyid::pgp_keyid_free(id)); if result != Status::Success { |