Skip to content

Commit 060bfcf

Browse files
authored
Rollup merge of #93485 - est31:remove_curly, r=joshtriplett
core: Remove some redundant {}s from the sorting code
2 parents 6007644 + cde240c commit 060bfcf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/core/src/slice/sort.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ where
773773
let mid = partition_equal(v, pivot, is_less);
774774

775775
// Continue sorting elements greater than the pivot.
776-
v = &mut { v }[mid..];
776+
v = &mut v[mid..];
777777
continue;
778778
}
779779
}
@@ -784,7 +784,7 @@ where
784784
was_partitioned = was_p;
785785

786786
// Split the slice into `left`, `pivot`, and `right`.
787-
let (left, right) = { v }.split_at_mut(mid);
787+
let (left, right) = v.split_at_mut(mid);
788788
let (pivot, right) = right.split_at_mut(1);
789789
let pivot = &pivot[0];
790790

@@ -860,7 +860,7 @@ fn partition_at_index_loop<'a, T, F>(
860860
let (mid, _) = partition(v, pivot, is_less);
861861

862862
// Split the slice into `left`, `pivot`, and `right`.
863-
let (left, right) = { v }.split_at_mut(mid);
863+
let (left, right) = v.split_at_mut(mid);
864864
let (pivot, right) = right.split_at_mut(1);
865865
let pivot = &pivot[0];
866866

0 commit comments

Comments
 (0)