about summary refs log tree commit diff
path: root/src/librustc_parse/parser/expr.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2020-03-03 01:19:00 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2020-03-03 03:15:03 +0100
commitd3e5177f816d723cbce31ae7a7779feca8a69724 (patch)
tree6b36c419c3eb8150104eb51c4dd0758864f23046 /src/librustc_parse/parser/expr.rs
parent97b3d816152774e45d01d44cd5b44565dc7aba58 (diff)
downloadrust-d3e5177f816d723cbce31ae7a7779feca8a69724.tar.gz
rust-d3e5177f816d723cbce31ae7a7779feca8a69724.zip
Use .next() instead of .nth(0) on iterators.
Diffstat (limited to 'src/librustc_parse/parser/expr.rs')
-rw-r--r--src/librustc_parse/parser/expr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_parse/parser/expr.rs b/src/librustc_parse/parser/expr.rs
index 18ddd23588e..14366eb4e87 100644
--- a/src/librustc_parse/parser/expr.rs
+++ b/src/librustc_parse/parser/expr.rs
@@ -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)