summaryrefslogtreecommitdiffstats
path: root/openpgp/src/cert/bindings.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-01-20 10:32:51 +0100
committerJustus Winter <justus@sequoia-pgp.org>2020-01-20 10:34:40 +0100
commita1230b3a6c31d77fff4626814de4a681e2f2a3a0 (patch)
tree58ec2fd279c1eb57c022390f04377b7491f8ee27 /openpgp/src/cert/bindings.rs
parent312ad42659b6b16983981dfbc891972cd0ff9e01 (diff)
openpgp: Use the new framework for Cert::userid.
- Fixes #414.
Diffstat (limited to 'openpgp/src/cert/bindings.rs')
-rw-r--r--openpgp/src/cert/bindings.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/openpgp/src/cert/bindings.rs b/openpgp/src/cert/bindings.rs
index 204c38be..a5493a8b 100644
--- a/openpgp/src/cert/bindings.rs
+++ b/openpgp/src/cert/bindings.rs
@@ -161,7 +161,7 @@ impl UserID {
///
/// // Alice now certifies the binding between `bob@example.org` and `bob`.
/// let certificate =
- /// bob.userids().nth(0).unwrap().userid()
+ /// bob.userids().nth(0).unwrap()
/// .certify(&mut keypair, &bob, SignatureType::PositiveCertification,
/// None, None)?;
///
@@ -169,7 +169,8 @@ impl UserID {
/// let bob = bob.merge_packets(vec![certificate.into()])?;
///
/// // Check that we have a certification on the userid.
- /// assert_eq!(bob.userids().nth(0).unwrap().certifications().len(), 1);
+ /// assert_eq!(bob.userids().components().nth(0).unwrap()
+ /// .certifications().len(), 1);
/// # Ok(()) }
pub fn certify<S, H, T>(&self, signer: &mut dyn Signer, cert: &Cert,
signature_type: S,