summaryrefslogtreecommitdiffstats
path: root/openpgp/src/serialize/cert.rs
diff options
context:
space:
mode:
Diffstat (limited to 'openpgp/src/serialize/cert.rs')
-rw-r--r--openpgp/src/serialize/cert.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/openpgp/src/serialize/cert.rs b/openpgp/src/serialize/cert.rs
index 4d98569a..83e804ed 100644
--- a/openpgp/src/serialize/cert.rs
+++ b/openpgp/src/serialize/cert.rs
@@ -294,7 +294,7 @@ impl Cert {
/// ```
pub struct TSK<'a> {
pub(crate) cert: &'a Cert,
- filter: Box<dyn Fn(&'a key::UnspecifiedSecret) -> bool + 'a>,
+ filter: Box<dyn Fn(&key::UnspecifiedSecret) -> bool + 'a>,
emit_stubs: bool,
}
@@ -385,7 +385,7 @@ impl<'a> TSK<'a> {
/// # Ok(()) }
/// ```
pub fn set_filter<P>(mut self, predicate: P) -> Self
- where P: 'a + Fn(&'a key::UnspecifiedSecret) -> bool
+ where P: 'a + Fn(&key::UnspecifiedSecret) -> bool
{
self.filter = Box::new(predicate);
self
@@ -1029,7 +1029,7 @@ mod test {
check!(&cert_0, &tsk_0, true);
// Filters out secrets.
- let no_secrets = |_| false;
+ let no_secrets = |_: &_| false;
// TSK's equality.
check!(tsk_0.as_tsk(), tsk_1.as_tsk(), true);
@@ -1070,7 +1070,7 @@ mod test {
let tsk = Cert::from_bytes(crate::tests::key("testy-private.pgp"))?;
// Filters out secrets.
- let no_secrets = |_| false;
+ let no_secrets = |_: &_| false;
assert!(! cert.as_tsk().emits_secret_key_packets());
assert!(cert.as_tsk().emit_secret_key_stubs(true)