summaryrefslogtreecommitdiffstats
path: root/autocrypt
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-02-17 15:18:40 +0100
committerJustus Winter <justus@sequoia-pgp.org>2020-02-17 15:18:40 +0100
commit6ae9d4ec0661d21f1c1579b901d0cc400811c43c (patch)
tree7988345586ba44531ed971f2444d23d6ebf73fa7 /autocrypt
parentf0944f2e18485dfa693a252956efe0896d225ab7 (diff)
openpgp: Reduce the number of explicit key conversions.
Diffstat (limited to 'autocrypt')
-rw-r--r--autocrypt/src/lib.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/autocrypt/src/lib.rs b/autocrypt/src/lib.rs
index 95e6b297..f2aee4e9 100644
--- a/autocrypt/src/lib.rs
+++ b/autocrypt/src/lib.rs
@@ -112,9 +112,8 @@ impl AutocryptHeader {
let mut acc = Vec::new();
// The primary key and the most recent selfsig.
- let primary = cert.primary_key().bundle();
- acc.push(primary.key().clone().mark_role_primary().into());
- primary.self_signatures().iter().take(1)
+ acc.push(cert.primary_key().key().clone().into());
+ cert.primary_key().bundle().self_signatures().iter().take(1)
.for_each(|s| acc.push(s.clone().into()));
// The subkeys and the most recent selfsig.