From 86309e9c4971bd2e4ba80bf4a655aab091cd89b9 Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Wed, 26 Feb 2020 22:59:49 +0100 Subject: openpgp: Don't unnecessarily use ComponentAmalgamation::bundle. - A `ComponentAmalgamation` derefs to a `ComponentBundle`. Don't use `ComponentAmalgamation::bundle` if it is unnecessary and doesn't improve legibility. --- net/src/wkd.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/src/wkd.rs') diff --git a/net/src/wkd.rs b/net/src/wkd.rs index 542689bb..fe7976a5 100644 --- a/net/src/wkd.rs +++ b/net/src/wkd.rs @@ -235,7 +235,7 @@ fn parse_body>(body: &[u8], email_address: S) let valid_certs: Vec = certs.iter() // XXX: This filter could become a Cert method, but it adds other API // method to maintain - .filter(|cert| {cert.userids().bundles() + .filter(|cert| {cert.userids() .any(|uidb| if let Ok(Some(a)) = uidb.userid().email() { a == email_address @@ -344,7 +344,7 @@ pub fn insert(base_path: P, domain: S, variant: V, let variant = variant.into().unwrap_or_default(); // First, check which UserIDs are in `domain`. - let addresses = cert.userids().bundles().filter_map(|uidb| { + let addresses = cert.userids().filter_map(|uidb| { uidb.userid().email().unwrap_or(None).and_then(|addr| { if EmailAddress::from(&addr).ok().map(|e| e.domain == domain) .unwrap_or(false) -- cgit v1.2.3