Skip to content

Commit b1501c3

Browse files
committed
refactor: use .into_sorted_by
1 parent debc50c commit b1501c3

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

tests/deduplicate_hardlinks.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,10 @@ fn multiple_hardlinks_to_a_single_file_with_deduplication() {
5858
.add(file_size);
5959
assert_eq!(actual_size, expected_size);
6060

61-
let actual_children = {
62-
let mut children = tree.children.clone();
63-
children.sort_by(|a, b| a.name.cmp(&b.name));
64-
children
65-
};
61+
let actual_children = tree
62+
.children
63+
.clone()
64+
.into_sorted_by(|a, b| a.name.cmp(&b.name));
6665
let expected_children: Vec<_> = {
6766
let links = (0..links).map(|num| format!("link.{num}"));
6867
let node = |name| Reflection {

0 commit comments

Comments
 (0)