Skip to content

Commit

Permalink
fix: rustfmt
Browse files Browse the repository at this point in the history
Signed-off-by: Lachezar Lechev <[email protected]>
  • Loading branch information
elpiel committed Oct 10, 2023
1 parent f87a950 commit d6c718c
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/models/library_by_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,16 @@ fn catalogs_update<F: LibraryFilter>(
.items
.values()
.filter(|library_item| F::predicate(library_item, notifications))
.fold(HashMap::<&str, Vec<LibraryItem>>::new(), |mut result, library_item| {
result
.entry(&library_item.r#type)
.or_default()
.push(library_item.to_owned());
result
})
.fold(
HashMap::<&str, Vec<LibraryItem>>::new(),
|mut result, library_item| {
result
.entry(&library_item.r#type)
.or_default()
.push(library_item.to_owned());
result
},
)
.into_iter()
.sorted_by(|(a_type, _), (b_type, _)| {
compare_with_priorities(*a_type, *b_type, &*TYPE_PRIORITIES)
Expand Down

0 comments on commit d6c718c

Please sign in to comment.