From 16b5a1228990f53574f3b2d9d2a4143163e7cd91 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Mon, 27 Jun 2022 18:38:27 +0200 Subject: openpgp: Make Cert::insert_packets_merge take a FnMut. - This way, the callback can have side-effects. --- openpgp/src/cert.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'openpgp/src/cert.rs') diff --git a/openpgp/src/cert.rs b/openpgp/src/cert.rs index 053220bd..135d7d90 100644 --- a/openpgp/src/cert.rs +++ b/openpgp/src/cert.rs @@ -2602,7 +2602,7 @@ impl Cert { -> Result<(Self, bool)> where P: IntoIterator, P::Item: Into, - I: Fn(Option, Packet) -> Result, + I: FnMut(Option, Packet) -> Result, { self.insert_packets_(&mut packets.into_iter().map(Into::into), Box::new(merge)) @@ -2615,8 +2615,8 @@ impl Cert { /// we avoid the cost of monomorphization. fn insert_packets_<'a>(self, packets: &mut dyn Iterator, - merge: Box, Packet) - -> Result + 'a>) + mut merge: Box, Packet) + -> Result + 'a>) -> Result<(Self, bool)> { let mut changed = false; -- cgit v1.2.3