diff options
Diffstat (limited to 'openpgp/src/policy.rs')
-rw-r--r-- | openpgp/src/policy.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openpgp/src/policy.rs b/openpgp/src/policy.rs index 716750af..75e5c5b8 100644 --- a/openpgp/src/policy.rs +++ b/openpgp/src/policy.rs @@ -1764,7 +1764,7 @@ mod test { // Revoke it. let mut keypair = cert.primary_key().key().clone() .parts_into_secret()?.into_keypair()?; - let ca = cert.userids().nth(0).unwrap(); + let ca = cert.userids().next().unwrap(); // Generate the revocation for the first and only UserID. let revocation = @@ -1821,7 +1821,7 @@ mod test { // Generate the revocation for the first subkey. - let subkey = cert.keys().subkeys().nth(0).unwrap(); + let subkey = cert.keys().subkeys().next().unwrap(); let revocation = SubkeyRevocationBuilder::new() .set_reason_for_revocation( @@ -2607,7 +2607,7 @@ mod test { let mut pair = Cert::from_bytes( crate::tests::key("testy-private.pgp"))? .keys().with_policy(p, None) - .for_transport_encryption().secret().nth(0).unwrap() + .for_transport_encryption().secret().next().unwrap() .key().clone().into_keypair()?; pkesks[0].decrypt(&mut pair, algo) .map(|(algo, session_key)| decrypt(algo, &session_key)); |