summaryrefslogtreecommitdiffstats
path: root/openpgp
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2021-11-22 19:48:17 +0100
committerNora Widdecke <nora@sequoia-pgp.org>2021-11-29 11:53:55 +0100
commitde63b2d073e92d0618ea7af3ecf2881252a31aed (patch)
tree77026ed476b1f09167d22977dc668823d48af418 /openpgp
parent192460a201a631a03e8e5a00469343fbe73fb437 (diff)
Drop unnecessary lifetime annotations.
Diffstat (limited to 'openpgp')
-rw-r--r--openpgp/src/packet/key.rs24
-rw-r--r--openpgp/src/parse.rs2
-rw-r--r--openpgp/src/serialize/cert_armored.rs4
-rw-r--r--openpgp/src/types/bitfield.rs2
4 files changed, 16 insertions, 16 deletions
diff --git a/openpgp/src/packet/key.rs b/openpgp/src/packet/key.rs
index ef49a291..d522b8b4 100644
--- a/openpgp/src/packet/key.rs
+++ b/openpgp/src/packet/key.rs
@@ -284,9 +284,9 @@ pub trait KeyParts: fmt::Debug + seal::Sealed {
/// [`key::PublicParts`]: PublicParts
/// [`key::UnspecifiedParts`]: UnspecifiedParts
/// [`key::SecretParts`]: SecretParts
- fn convert_key_amalgamation<'a, R: KeyRole>(
- ka: ComponentAmalgamation<'a, Key<UnspecifiedParts, R>>)
- -> Result<ComponentAmalgamation<'a, Key<Self, R>>>
+ fn convert_key_amalgamation<R: KeyRole>(
+ ka: ComponentAmalgamation<Key<UnspecifiedParts, R>>)
+ -> Result<ComponentAmalgamation<Key<Self, R>>>
where Self: Sized;
/// Converts a key amalgamation reference with unspecified parts
@@ -464,9 +464,9 @@ impl KeyParts for PublicParts {
Ok(bundle.into())
}
- fn convert_key_amalgamation<'a, R: KeyRole>(
- ka: ComponentAmalgamation<'a, Key<UnspecifiedParts, R>>)
- -> Result<ComponentAmalgamation<'a, Key<Self, R>>> {
+ fn convert_key_amalgamation<R: KeyRole>(
+ ka: ComponentAmalgamation<Key<UnspecifiedParts, R>>)
+ -> Result<ComponentAmalgamation<Key<Self, R>>> {
Ok(ka.into())
}
@@ -520,9 +520,9 @@ impl KeyParts for SecretParts {
bundle.try_into()
}
- fn convert_key_amalgamation<'a, R: KeyRole>(
- ka: ComponentAmalgamation<'a, Key<UnspecifiedParts, R>>)
- -> Result<ComponentAmalgamation<'a, Key<Self, R>>> {
+ fn convert_key_amalgamation<R: KeyRole>(
+ ka: ComponentAmalgamation<Key<UnspecifiedParts, R>>)
+ -> Result<ComponentAmalgamation<Key<Self, R>>> {
ka.try_into()
}
@@ -584,9 +584,9 @@ impl KeyParts for UnspecifiedParts {
Ok(bundle)
}
- fn convert_key_amalgamation<'a, R: KeyRole>(
- ka: ComponentAmalgamation<'a, Key<UnspecifiedParts, R>>)
- -> Result<ComponentAmalgamation<'a, Key<UnspecifiedParts, R>>> {
+ fn convert_key_amalgamation<R: KeyRole>(
+ ka: ComponentAmalgamation<Key<UnspecifiedParts, R>>)
+ -> Result<ComponentAmalgamation<Key<UnspecifiedParts, R>>> {
Ok(ka)
}
diff --git a/openpgp/src/parse.rs b/openpgp/src/parse.rs
index e2aa2660..36e28eb3 100644
--- a/openpgp/src/parse.rs
+++ b/openpgp/src/parse.rs
@@ -4807,7 +4807,7 @@ impl <'a> PacketParser<'a> {
/// }
/// # Ok(()) }
// Note: this function is public and may be called multiple times!
- pub fn finish<'b>(&'b mut self) -> Result<&'b Packet> {
+ pub fn finish(&mut self) -> Result<&Packet> {
let indent = self.recursion_depth();
tracer!(TRACE, "PacketParser::finish", indent);
diff --git a/openpgp/src/serialize/cert_armored.rs b/openpgp/src/serialize/cert_armored.rs
index 529a4379..65b4dd25 100644
--- a/openpgp/src/serialize/cert_armored.rs
+++ b/openpgp/src/serialize/cert_armored.rs
@@ -81,8 +81,8 @@ impl Cert {
/// assert!(armored.contains("Mr. Pink ☮☮☮"));
/// # Ok(()) }
/// ```
- pub fn armored<'a>(&'a self)
- -> impl crate::serialize::Serialize + crate::serialize::SerializeInto + 'a
+ pub fn armored(&self)
+ -> impl crate::serialize::Serialize + crate::serialize::SerializeInto + '_
{
Encoder::new(self)
}
diff --git a/openpgp/src/types/bitfield.rs b/openpgp/src/types/bitfield.rs
index c6dd5f13..9fce02c3 100644
--- a/openpgp/src/types/bitfield.rs
+++ b/openpgp/src/types/bitfield.rs
@@ -11,7 +11,7 @@ impl From<Vec<u8>> for Bitfield {
}
impl Bitfield {
- pub fn iter<'a>(&'a self) -> impl Iterator<Item = usize> + Send + Sync + 'a
+ pub fn iter(&self) -> impl Iterator<Item = usize> + Send + Sync + '_
{
self.raw.iter()
.flat_map(|b| {