diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-07-21 12:47:32 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-07-21 12:47:32 +0200 |
commit | 8cc0d7b85f979276157d5b51c6ee54d404c57d7b (patch) | |
tree | cb26677f524d711bf3ad44684c1d74ce6d1bbc68 /openpgp/src/packet_pile.rs | |
parent | 14432de9be3fec6f54496f1e1720d961d636e0b1 (diff) |
openpgp: Remove PacketParserResult::is_none.
- There is no variant called `None`, so having this predicate seems
wrong.
- See #489.
Diffstat (limited to 'openpgp/src/packet_pile.rs')
-rw-r--r-- | openpgp/src/packet_pile.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/openpgp/src/packet_pile.rs b/openpgp/src/packet_pile.rs index af61eb7e..a4dd949f 100644 --- a/openpgp/src/packet_pile.rs +++ b/openpgp/src/packet_pile.rs @@ -549,7 +549,7 @@ impl<'a> TryFrom<PacketParserResult<'a>> for PacketPile { let mut last_position = 0; - if ppr.is_none() { + if ppr.is_eof() { // Empty message. return Ok(PacketPile::from(Vec::new())); } @@ -600,7 +600,7 @@ impl<'a> TryFrom<PacketParserResult<'a>> for PacketPile { container.children_mut().unwrap().push(packet); - if ppr.is_none() { + if ppr.is_eof() { break 'outer; } @@ -848,7 +848,7 @@ mod test { // recurse should now not recurse. Since there is nothing // following the compressed packet, ppr should be EOF. let (packet, ppr) = pp.next().unwrap(); - assert!(ppr.is_none()); + assert!(ppr.is_eof()); // Get the rest of the content and put the initial byte that // we stole back. @@ -864,7 +864,7 @@ mod test { // And we're done... let ppr = pp.next().unwrap().1; - assert!(ppr.is_none()); + assert!(ppr.is_eof()); } #[test] |