From 73b3321d98e0298dba5d4ef63e8058a01cc2943c Mon Sep 17 00:00:00 2001 From: Nora Widdecke Date: Wed, 7 Apr 2021 20:35:38 +0200 Subject: Lint: Use next instead of nth(0). - https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero --- openpgp/src/packet/userid.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openpgp/src/packet/userid.rs') 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 -- cgit v1.2.3