summaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2020-01-04 17:26:55 +0100
committerNeal H. Walfield <neal@pep.foundation>2020-01-04 17:26:55 +0100
commita01b070c9599be7f2be4dfaa25dd9ff01efe8a57 (patch)
treedfc18bcda1c076e02736709df5c0c8db6b13b844 /tool
parent81e8f7869ea40f0ca02eef16ced70b8339eca7c3 (diff)
openpgp: Change KeyIter::key_flags to not require an owned KeyFlags.
- Instead of taking a `KeyFlags`, change `KeyIter::key_flags` to take a `Borrow<KeyFlags>`. - Update callers to pass a reference instead of cloning.
Diffstat (limited to 'tool')
-rw-r--r--tool/src/commands/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tool/src/commands/mod.rs b/tool/src/commands/mod.rs
index b4ea9037..cde1e664 100644
--- a/tool/src/commands/mod.rs
+++ b/tool/src/commands/mod.rs
@@ -112,8 +112,8 @@ pub fn encrypt(mapping: &mut store::Mapping,
let mut recipient_subkeys: Vec<Recipient> = Vec::new();
for cert in certs.iter() {
let mut count = 0;
- for key in cert.keys().alive().revoked(false).
- key_flags(mode.clone()).map(|ka| ka.key())
+ for key in cert.keys().alive().revoked(false)
+ .key_flags(&mode).map(|ka| ka.key())
{
recipient_subkeys.push(key.into());
count += 1;