summaryrefslogtreecommitdiffstats
path: root/openpgp/src/cert/builder.rs
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2021-04-07 20:35:38 +0200
committerNora Widdecke <nora@sequoia-pgp.org>2021-04-09 13:13:59 +0200
commit73b3321d98e0298dba5d4ef63e8058a01cc2943c (patch)
tree0b5ef2427f8d95085c2819c8e9dba02c3c6f0c65 /openpgp/src/cert/builder.rs
parent19169b76117db8b1d81f1aafa64a5440d042803d (diff)
Lint: Use next instead of nth(0).
- https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero
Diffstat (limited to 'openpgp/src/cert/builder.rs')
-rw-r--r--openpgp/src/cert/builder.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/openpgp/src/cert/builder.rs b/openpgp/src/cert/builder.rs
index 6117a325..d0147b99 100644
--- a/openpgp/src/cert/builder.rs
+++ b/openpgp/src/cert/builder.rs
@@ -1311,15 +1311,13 @@ mod tests {
assert!(! sig.key_alive(key, now + 610 * s).is_ok());
let ka = cert.keys().with_policy(p, now).alive().revoked(false)
- .for_signing()
- .nth(0).unwrap();
+ .for_signing().next().unwrap();
assert!(ka.alive().is_ok());
assert!(ka.clone().with_policy(p, now + 290 * s).unwrap().alive().is_ok());
assert!(! ka.clone().with_policy(p, now + 310 * s).unwrap().alive().is_ok());
let ka = cert.keys().with_policy(p, now).alive().revoked(false)
- .for_authentication()
- .nth(0).unwrap();
+ .for_authentication().next().unwrap();
assert!(ka.alive().is_ok());
assert!(ka.clone().with_policy(p, now + 590 * s).unwrap().alive().is_ok());
assert!(! ka.clone().with_policy(p, now + 610 * s).unwrap().alive().is_ok());