Rollup merge of #93485 - est31:remove_curly, r=joshtriplett
core: Remove some redundant {}s from the sorting code
This commit is contained in:
commit
24737bd1ab
@ -773,7 +773,7 @@ fn recurse<'a, T, F>(mut v: &'a mut [T], is_less: &mut F, mut pred: Option<&'a T
|
||||
let mid = partition_equal(v, pivot, is_less);
|
||||
|
||||
// Continue sorting elements greater than the pivot.
|
||||
v = &mut { v }[mid..];
|
||||
v = &mut v[mid..];
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -784,7 +784,7 @@ fn recurse<'a, T, F>(mut v: &'a mut [T], is_less: &mut F, mut pred: Option<&'a T
|
||||
was_partitioned = was_p;
|
||||
|
||||
// Split the slice into `left`, `pivot`, and `right`.
|
||||
let (left, right) = { v }.split_at_mut(mid);
|
||||
let (left, right) = v.split_at_mut(mid);
|
||||
let (pivot, right) = right.split_at_mut(1);
|
||||
let pivot = &pivot[0];
|
||||
|
||||
@ -860,7 +860,7 @@ fn partition_at_index_loop<'a, T, F>(
|
||||
let (mid, _) = partition(v, pivot, is_less);
|
||||
|
||||
// Split the slice into `left`, `pivot`, and `right`.
|
||||
let (left, right) = { v }.split_at_mut(mid);
|
||||
let (left, right) = v.split_at_mut(mid);
|
||||
let (pivot, right) = right.split_at_mut(1);
|
||||
let pivot = &pivot[0];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user