mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
Resolve rust clippy warnings (#946)
* refactor: avoid using `collect()` when not needed and cascade notation * refactor: The user might expect to be able to use Default as the type can be constructed without arguments. * refactor: using `clone` on type `indextree::NodeId` which implements the `Copy` trait * refactor: remove intermediary variables and use cascade notation * refactor: using `clone` on type `indextree::NodeId` which implements the `Copy` trait * refactor: unneeded `return` statement * refactor: ok_or_else avoids executing a function when it's not needed * refactor: dereferenced by the compiler * refactor: user enumeration for index * refactor: using `clone` on type `usize` which implements the `Copy` trait * refactor: useless conversion to the same type: `&str` * refactor: The user might expect to be able use Default as type can be constructed without arguments * refactor: The user might expect to be able use Default as type can be constructed without arguments * fix: rust formating with fmt * fix: conflict default implementation Co-authored-by: appflowy <annie@appflowy.io>
This commit is contained in:
@ -285,10 +285,11 @@ fn merge_groups(old_groups: &[GroupRevision], groups: Vec<Group>) -> MergeGroupR
|
||||
}
|
||||
|
||||
// Find out the new groups
|
||||
let new_groups = group_map.into_values();
|
||||
for (index, group) in new_groups.into_iter().enumerate() {
|
||||
merge_result.add_insert_group(index, group);
|
||||
}
|
||||
group_map
|
||||
.into_values()
|
||||
.enumerate()
|
||||
.for_each(|(index, group)| merge_result.add_insert_group(index, group));
|
||||
|
||||
merge_result
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user