Use .next() instead of .nth(0) on iterators.

This commit is contained in:
Matthias Krüger 2020-03-03 01:19:00 +01:00
parent 97b3d81615
commit d3e5177f81
12 changed files with 14 additions and 14 deletions

View file

@ -955,7 +955,7 @@ impl<'a> Parser<'a> {
};
let kind = if es.len() == 1 && !trailing_comma {
// `(e)` is parenthesized `e`.
ExprKind::Paren(es.into_iter().nth(0).unwrap())
ExprKind::Paren(es.into_iter().next().unwrap())
} else {
// `(e,)` is a tuple with only one field, `e`.
ExprKind::Tup(es)