Use .next() instead of .nth(0) on iterators.
This commit is contained in:
parent
97b3d81615
commit
d3e5177f81
12 changed files with 14 additions and 14 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue