diff options
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 |