Skip to content

Commit e37271d

Browse files
committed
Use itertools::zip_eq
1 parent 8dff5dc commit e37271d

File tree

1 file changed

+2
-4
lines changed
  • compiler/rustc_mir_build/src/build/expr

1 file changed

+2
-4
lines changed

compiler/rustc_mir_build/src/build/expr/into.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//! See docs in build/expr/mod.rs
22
3-
use std::iter;
4-
53
use rustc_ast::{AsmMacro, InlineAsmOptions};
64
use rustc_data_structures::fx::FxHashMap;
75
use rustc_data_structures::stack::ensure_sufficient_stack;
@@ -357,7 +355,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
357355
// We desugar FRU as we lower to MIR, so for each
358356
// base-supplied field, generate an operand that
359357
// reads it from the base.
360-
iter::zip(field_names, &**field_types)
358+
itertools::zip_eq(field_names, &**field_types)
361359
.map(|(n, ty)| match fields_map.get(&n) {
362360
Some(v) => v.clone(),
363361
None => {
@@ -369,7 +367,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
369367
.collect()
370368
}
371369
AdtExprBase::DefaultFields(field_types) => {
372-
iter::zip(field_names, &**field_types)
370+
itertools::zip_eq(field_names, &**field_types)
373371
.map(|(n, ty)| match fields_map.get(&n) {
374372
Some(v) => v.clone(),
375373
None => match variant.fields[n].value {

0 commit comments

Comments
 (0)