diff options
author | Nora Widdecke <nora@sequoia-pgp.org> | 2021-04-07 20:35:38 +0200 |
---|---|---|
committer | Nora Widdecke <nora@sequoia-pgp.org> | 2021-04-09 13:13:59 +0200 |
commit | 73b3321d98e0298dba5d4ef63e8058a01cc2943c (patch) | |
tree | 0b5ef2427f8d95085c2819c8e9dba02c3c6f0c65 /openpgp/src/packet/userid.rs | |
parent | 19169b76117db8b1d81f1aafa64a5440d042803d (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/packet/userid.rs')
-rw-r--r-- | openpgp/src/packet/userid.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/openpgp/src/packet/userid.rs b/openpgp/src/packet/userid.rs index 2994f23e..e2f81a6a 100644 --- a/openpgp/src/packet/userid.rs +++ b/openpgp/src/packet/userid.rs @@ -222,7 +222,7 @@ impl ConventionallyParsedUserID { // The regex is anchored at the start and at the end so we // have either 0 or 1 matches. - if let Some(cap) = USER_ID_PARSER.captures_iter(&userid).nth(0) { + if let Some(cap) = USER_ID_PARSER.captures_iter(&userid).next() { let to_range = |m: regex::Match| (m.start(), m.end()); // We need to figure out which branch matched. Match on a |