diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2022-03-02 14:43:45 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2022-03-25 13:27:40 +0100 |
commit | 407141a8e798d5799b16b2d5310a06c0aae38244 (patch) | |
tree | cb2b4280815938b7cc31480e72d759cb208388bf | |
parent | 5c42e3024dbfb4b2aa9d74f931ef944a778a10d8 (diff) |
openpgp: Make test more robust.
- There can be other reasons why parsing the packet fails. Notably,
any use of php_try! may return an unknown packet with an arbitrary
error type and value.
-rw-r--r-- | openpgp/src/parse.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/openpgp/src/parse.rs b/openpgp/src/parse.rs index a7fbb085..72241d73 100644 --- a/openpgp/src/parse.rs +++ b/openpgp/src/parse.rs @@ -5887,10 +5887,8 @@ mod test { Packet::PublicSubkey(_) => subkeys += 1, Packet::UserID(_) => userids += 1, Packet::UserAttribute(_) => uas += 1, - Packet::Unknown(ref u) => { + Packet::Unknown(_) => { unknown += 1; - assert_match!(Some(&Error::MalformedPacket(_)) - = u.error().downcast_ref()); }, _ => (), } |