Skip to content

Commit

Permalink
clippy: flat_map
Browse files Browse the repository at this point in the history
  • Loading branch information
zjp-CN committed Nov 19, 2024
1 parent 9a30221 commit f31f76d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl From<Vec<Item>> for DiagnosticsCount {
DiagnosticsCount {
map: value
.into_iter()
.map(|val| {
.flat_map(|val| {
val.children.into_iter().map(|child| {
let Data {
user,
Expand All @@ -53,7 +53,6 @@ impl From<Vec<Item>> for DiagnosticsCount {
(Key { user, repo, pkg }, total_count)
})
})
.flatten()
.collect(),
}
}
Expand Down

0 comments on commit f31f76d

Please sign in to comment.