diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2023-03-13 11:57:35 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2023-03-13 11:58:59 +0100 |
commit | 4dc6e624c2394936dc447f18aedb4a4810bb2ddb (patch) | |
tree | 44f1e68cca0b01a7d0fbd0daceaaa82ca7e800f2 /openpgp/src/packet_pile.rs | |
parent | 336a1562bfe3ad5fe32b5e3017c88197f5bad0fa (diff) |
openpgp: Fix test.
- Previously, NotAsFarAsWeKnow was interpreted as identifier making
the if let binding irrefutable.
- Fixes 7afee60b7cf0f19559bfccd8c42fdc77f6b9c655.
Diffstat (limited to 'openpgp/src/packet_pile.rs')
-rw-r--r-- | openpgp/src/packet_pile.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openpgp/src/packet_pile.rs b/openpgp/src/packet_pile.rs index e10795c6..fe45e736 100644 --- a/openpgp/src/packet_pile.rs +++ b/openpgp/src/packet_pile.rs @@ -52,7 +52,7 @@ use crate::parse::Cookie; /// use openpgp::serialize::Serialize; /// use openpgp::policy::StandardPolicy; /// use openpgp::crypto::mpi; -/// use openpgp::types::RevocationStatus::{Revoked, CouldBe}; +/// use openpgp::types::RevocationStatus; /// /// # fn main() -> openpgp::Result<()> { /// let (cert, revocation) = CertBuilder::new().generate()?; @@ -68,7 +68,7 @@ use crate::parse::Cookie; /// // revocation signature /// let pp: PacketPile = PacketPile::from_bytes(&buffer)?; /// let cert = Cert::try_from(pp)?; -/// if let Revoked(_) = cert.revocation_status(policy, None) { +/// if let RevocationStatus::Revoked(_) = cert.revocation_status(policy, None) { /// // cert is considered revoked /// } /// # else { @@ -92,7 +92,7 @@ use crate::parse::Cookie; /// } /// /// let cert = Cert::try_from(pp)?; -/// if let NotAsFarAsWeKnow = cert.revocation_status(policy, None) { +/// if let RevocationStatus::NotAsFarAsWeKnow = cert.revocation_status(policy, None) { /// // revocation signature is broken and the cert is not revoked /// assert_eq!(cert.bad_signatures().count(), 1); /// } |