diff options
author | Nora Widdecke <nora@sequoia-pgp.org> | 2021-11-25 19:52:05 +0100 |
---|---|---|
committer | Nora Widdecke <nora@sequoia-pgp.org> | 2021-11-29 11:53:56 +0100 |
commit | 015e3550638914fa905490dc33eb2dccefbc75f4 (patch) | |
tree | 9f7036be66d51ae1588e3fdb8c66767be1768e1a /openpgp | |
parent | 286b6b54790e964800f91e2af3a8784aadc23b8b (diff) |
openpgp: Use next() instead of nth(0).
- Found with clippy::iter_nth_zero.
Diffstat (limited to 'openpgp')
-rw-r--r-- | openpgp/benches/common/encrypt.rs | 4 | ||||
-rw-r--r-- | openpgp/benches/parse_cert.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/openpgp/benches/common/encrypt.rs b/openpgp/benches/common/encrypt.rs index 321faf6c..38195808 100644 --- a/openpgp/benches/common/encrypt.rs +++ b/openpgp/benches/common/encrypt.rs @@ -55,7 +55,7 @@ pub fn sign(bytes: &[u8], sender: &Cert) -> openpgp::Result<Vec<u8>> { .with_policy(p, None) .secret() .for_signing() - .nth(0) + .next() .unwrap() .key() .clone() @@ -84,7 +84,7 @@ pub fn encrypt_to_cert_and_sign( .with_policy(p, None) .secret() .for_signing() - .nth(0) + .next() .unwrap() .key() .clone() diff --git a/openpgp/benches/parse_cert.rs b/openpgp/benches/parse_cert.rs index 55c9359e..05e9970f 100644 --- a/openpgp/benches/parse_cert.rs +++ b/openpgp/benches/parse_cert.rs @@ -48,7 +48,7 @@ fn generate_flooded_cert( .generate()?; let floodme_cloned = floodme.clone(); - let userid = floodme_cloned.userids().nth(0).unwrap(); + let userid = floodme_cloned.userids().next().unwrap(); let certifications = (0..key_count).flat_map(|_| { generate_certifications(&userid, &floodme_cloned, sigs_per_key) |