summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2020-04-29 08:52:15 +0200
committerNeal H. Walfield <neal@pep.foundation>2020-04-29 08:55:56 +0200
commitc5e71b5d4c339e2c6514dad362c5469b141ef4a7 (patch)
treef947774983feb0ade8e9f0bc20db4e7b6ab96d0a /openpgp-ffi
parent43ae5abcb0b2f63cd2ae1c6777f84001a3be07c0 (diff)
openpgp: Change Cert::merge_packets to take an IntoIterator.
- Change `Cert::merge_packets` to take an `IntoIterator` instead of a vector. - This change simplifies the most common case of passing in a single packet, and doesn't make the second most common case of passing in a vector of packets any more complicated.
Diffstat (limited to 'openpgp-ffi')
-rw-r--r--openpgp-ffi/src/cert.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/openpgp-ffi/src/cert.rs b/openpgp-ffi/src/cert.rs
index 4a7c2238..659c5210 100644
--- a/openpgp-ffi/src/cert.rs
+++ b/openpgp-ffi/src/cert.rs
@@ -118,7 +118,7 @@ fn pgp_cert_merge_packets(errp: Option<&mut *mut crate::error::Error>,
slice::from_raw_parts_mut(packets, packets_len)
};
let packets =
- packets.iter_mut().map(|&mut p| p.move_from_raw()).collect();
+ packets.iter_mut().map(|&mut p| p.move_from_raw());
cert.merge_packets(packets).move_into_raw(errp)
}