diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2024-04-22 17:18:56 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2024-04-23 11:58:35 +0200 |
commit | 33892580b08b72950b81522c1874ffa793a1ba42 (patch) | |
tree | 20405978074d1c1b2f3d6a9bb82101ee4d0ffb18 | |
parent | c55e082ccc1358e3d65eefea81456b6d34857c8a (diff) |
openpgp: Avoid deprecated Bundle::self_signatures in doctests.
-rw-r--r-- | openpgp/src/packet/signature/subpacket.rs | 4 | ||||
-rw-r--r-- | openpgp/src/types/timestamp.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/openpgp/src/packet/signature/subpacket.rs b/openpgp/src/packet/signature/subpacket.rs index 2a9df958..42db8cd2 100644 --- a/openpgp/src/packet/signature/subpacket.rs +++ b/openpgp/src/packet/signature/subpacket.rs @@ -5141,7 +5141,7 @@ impl signature::SignatureBuilder { /// # /// # // "Before" /// # for key in cert.with_policy(p, None)?.keys().subkeys() { - /// # assert_eq!(key.bundle().self_signatures().len(), 2); + /// # assert_eq!(key.bundle().self_signatures2().count(), 2); /// # assert!(key.alive().is_ok()); /// # } /// # @@ -5253,7 +5253,7 @@ impl signature::SignatureBuilder { /// # /// # // "Before" /// # for key in cert.with_policy(p, None)?.keys().subkeys() { - /// # assert_eq!(key.bundle().self_signatures().len(), 2); + /// # assert_eq!(key.bundle().self_signatures2().count(), 2); /// # assert!(key.alive().is_ok()); /// # } /// # diff --git a/openpgp/src/types/timestamp.rs b/openpgp/src/types/timestamp.rs index 4ed4ab6e..a7d16737 100644 --- a/openpgp/src/types/timestamp.rs +++ b/openpgp/src/types/timestamp.rs @@ -45,7 +45,7 @@ use crate::{ /// .generate()?; /// /// let subkey = cert.keys().subkeys().next().unwrap(); -/// let packets = subkey.bundle().self_signatures()[0].hashed_area(); +/// let packets = subkey.bundle().self_signatures2().next().unwrap().hashed_area(); /// /// match packets.subpacket(SubpacketTag::SignatureCreationTime).unwrap().value() { /// SubpacketValue::SignatureCreationTime(ts) => assert!(u32::from(*ts) > 0), |