about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/sync
diff options
context:
space:
mode:
authorNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2023-04-09 23:07:18 +0200
committerNilstrieb <48135649+Nilstrieb@users.noreply.github.com>2023-04-09 23:22:14 +0200
commit81c320ea7786a2b5a07a165aedacb438ae14fd74 (patch)
tree308dc087deac08d0d14d4b635760565f3ccab06a /compiler/rustc_data_structures/src/sync
parent6fceb0f6456d4bf526634ef8a3759c0c98ffaa79 (diff)
downloadrust-81c320ea7786a2b5a07a165aedacb438ae14fd74.tar.gz
rust-81c320ea7786a2b5a07a165aedacb438ae14fd74.zip
Fix some clippy::complexity
Diffstat (limited to 'compiler/rustc_data_structures/src/sync')
-rw-r--r--compiler/rustc_data_structures/src/sync/vec.rs2
1 files changed, 1 insertions, 1 deletions
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<T: Copy> AppendOnlyVec<T> {
     }
 
     pub fn iter(&self) -> impl Iterator<Item = T> + '_ {
-        (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()
     }
 }