diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-01-17 12:06:49 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-01-17 12:06:49 +0100 |
commit | 87c5c29bde8c2ec6cdd41c09425de90cda9f9d8f (patch) | |
tree | 39c05fdf9ae645c3ce3da3b18903d22b33ab63ff | |
parent | 67e79fe28c6827c2bfb68d75d331b9fd3a574843 (diff) |
openpgp: Make MessageStructureIntoIter private.
-rw-r--r-- | openpgp/src/parse/stream.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/parse/stream.rs b/openpgp/src/parse/stream.rs index 8599af93..8867b332 100644 --- a/openpgp/src/parse/stream.rs +++ b/openpgp/src/parse/stream.rs @@ -278,7 +278,7 @@ impl<'a> MessageStructure<'a> { } /// Iterates over the message structure. - pub fn into_iter(self) -> MessageStructureIntoIter<'a> { + pub fn into_iter(self) -> impl Iterator<Item = MessageLayer<'a>> { MessageStructureIntoIter(self.0.into_iter()) } } @@ -294,7 +294,7 @@ impl<'a> Iterator for MessageStructureIter<'a> { } /// Iterates over the message structure. -pub struct MessageStructureIntoIter<'a>(::std::vec::IntoIter<MessageLayer<'a>>); +struct MessageStructureIntoIter<'a>(::std::vec::IntoIter<MessageLayer<'a>>); impl<'a> Iterator for MessageStructureIntoIter<'a> { type Item = MessageLayer<'a>; |