From 81c320ea7786a2b5a07a165aedacb438ae14fd74 Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Sun, 9 Apr 2023 23:07:18 +0200 Subject: Fix some clippy::complexity --- compiler/rustc_data_structures/src/sync/vec.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_data_structures/src/sync') diff --git a/compiler/rustc_data_structures/src/sync/vec.rs b/compiler/rustc_data_structures/src/sync/vec.rs index aefaa8519d5..1783b4b3572 100644 --- a/compiler/rustc_data_structures/src/sync/vec.rs +++ b/compiler/rustc_data_structures/src/sync/vec.rs @@ -84,7 +84,7 @@ impl AppendOnlyVec { } pub fn iter(&self) -> impl Iterator + '_ { - (0..).map(|i| self.get(i)).take_while(|o| o.is_some()).filter_map(|o| o) + (0..).map(|i| self.get(i)).take_while(|o| o.is_some()).flatten() } } -- cgit 1.4.1-3-g733a5