Skip to content

Commit 4b70359

Browse files
authored
Rollup merge of #93631 - notriddle:notriddle/cleanup-some-into-iter, r=oli-obk
rustc_mir_dataflow: use iter::once instead of Some().into_iter
2 parents 03cad86 + a2a4cab commit 4b70359

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

compiler/rustc_mir_dataflow/src/elaborate_drops.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use rustc_middle::ty::subst::SubstsRef;
88
use rustc_middle::ty::util::IntTypeExt;
99
use rustc_middle::ty::{self, Ty, TyCtxt};
1010
use rustc_target::abi::VariantIdx;
11-
use std::fmt;
11+
use std::{fmt, iter};
1212

1313
/// The value of an inserted drop flag.
1414
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
@@ -329,8 +329,7 @@ where
329329
mut succ: BasicBlock,
330330
fields: &[(Place<'tcx>, Option<D::Path>)],
331331
) -> Vec<BasicBlock> {
332-
Some(succ)
333-
.into_iter()
332+
iter::once(succ)
334333
.chain(fields.iter().rev().zip(unwind_ladder).map(|(&(place, path), &unwind_succ)| {
335334
succ = self.drop_subpath(place, path, succ, unwind_succ);
336335
succ

0 commit comments

Comments
 (0)