From 5a07e33d2cc57d929bbd50a22cad703d4c666fc2 Mon Sep 17 00:00:00 2001 From: Matthias Krüger Date: Sat, 1 Apr 2023 23:50:45 +0200 Subject: use and_then/flat_map for map().flatten() --- compiler/rustc_trait_selection/src/traits/outlives_bounds.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'compiler/rustc_trait_selection/src') diff --git a/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs b/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs index 6d2dc94845d..cff3d277a78 100644 --- a/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs +++ b/compiler/rustc_trait_selection/src/traits/outlives_bounds.rs @@ -110,8 +110,6 @@ impl<'a, 'tcx: 'a> InferCtxtExt<'a, 'tcx> for InferCtxt<'tcx> { body_id: LocalDefId, tys: FxIndexSet>, ) -> Bounds<'a, 'tcx> { - tys.into_iter() - .map(move |ty| self.implied_outlives_bounds(param_env, body_id, ty)) - .flatten() + tys.into_iter().flat_map(move |ty| self.implied_outlives_bounds(param_env, body_id, ty)) } } -- cgit 1.4.1-3-g733a5