diff options
Diffstat (limited to 'openpgp')
-rw-r--r-- | openpgp/src/packet/container.rs | 6 | ||||
-rw-r--r-- | openpgp/src/packet/signature/subpacket.rs | 6 | ||||
-rw-r--r-- | openpgp/src/parse/map.rs | 2 | ||||
-rw-r--r-- | openpgp/src/serialize/cert.rs | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/openpgp/src/packet/container.rs b/openpgp/src/packet/container.rs index 42634c6e..15e24a50 100644 --- a/openpgp/src/packet/container.rs +++ b/openpgp/src/packet/container.rs @@ -270,7 +270,7 @@ impl Container { /// Returns an iterator over the packet's immediate children. /// /// Returns `None` if the body is not structured. - pub fn children<'a>(&'a self) -> Option<slice::Iter<'a, Packet>> { + pub fn children(&self) -> Option<slice::Iter<Packet>> { Some(self.children_ref()?.iter()) } @@ -435,8 +435,8 @@ impl Packet { } /// Returns an iterator over the packet's immediate children. - pub(crate) fn children<'a>(&'a self) - -> Option<impl Iterator<Item = &'a Packet>> { + pub(crate) fn children(& self) + -> Option<impl Iterator<Item = &Packet>> { self.container_ref().and_then(|c| c.children()) } diff --git a/openpgp/src/packet/signature/subpacket.rs b/openpgp/src/packet/signature/subpacket.rs index c1f7c510..f71647d5 100644 --- a/openpgp/src/packet/signature/subpacket.rs +++ b/openpgp/src/packet/signature/subpacket.rs @@ -2108,7 +2108,7 @@ impl SubpacketAreas { /// /// For subpackets that can safely occur in both subpacket areas, /// this function prefers instances in the hashed subpacket area. - pub fn subpacket<'a>(&'a self, tag: SubpacketTag) -> Option<&Subpacket> { + pub fn subpacket(&self, tag: SubpacketTag) -> Option<&Subpacket> { if let Some(sb) = self.hashed_area().subpacket(tag) { return Some(sb); } @@ -2141,8 +2141,8 @@ impl SubpacketAreas { /// /// For subpackets that can safely occur in both subpacket areas, /// this function prefers instances in the hashed subpacket area. - pub fn subpacket_mut<'a>(&'a mut self, tag: SubpacketTag) - -> Option<&mut Subpacket> { + pub fn subpacket_mut(&mut self, tag: SubpacketTag) + -> Option<&mut Subpacket> { if let Some(_) = self.hashed_area().subpacket(tag) { return self.hashed_area_mut().subpacket_mut(tag); } diff --git a/openpgp/src/parse/map.rs b/openpgp/src/parse/map.rs index b460deea..b0c7bbea 100644 --- a/openpgp/src/parse/map.rs +++ b/openpgp/src/parse/map.rs @@ -90,7 +90,7 @@ impl Map { /// assert_eq!(map.iter().count(), 6); /// # Ok(()) } /// ``` - pub fn iter<'a>(&'a self) -> impl Iterator<Item = Field<'a>> + Send + Sync { + pub fn iter(&self) -> impl Iterator<Item = Field> + Send + Sync { Iter::new(self) } } diff --git a/openpgp/src/serialize/cert.rs b/openpgp/src/serialize/cert.rs index c46e4253..b6967f02 100644 --- a/openpgp/src/serialize/cert.rs +++ b/openpgp/src/serialize/cert.rs @@ -198,7 +198,7 @@ impl Cert { /// This object writes out secret keys during serialization. /// /// [`TSK`]: crate::serialize::TSK - pub fn as_tsk<'a>(&'a self) -> TSK<'a> { + pub fn as_tsk(&self) -> TSK { TSK::new(self) } } |