core: Remove some redundant {}s from the sorting code
This commit is contained in:
parent
7cc28c128b
commit
cde240c1e8
1 changed files with 3 additions and 3 deletions
|
@ -773,7 +773,7 @@ where
|
||||||
let mid = partition_equal(v, pivot, is_less);
|
let mid = partition_equal(v, pivot, is_less);
|
||||||
|
|
||||||
// Continue sorting elements greater than the pivot.
|
// Continue sorting elements greater than the pivot.
|
||||||
v = &mut { v }[mid..];
|
v = &mut v[mid..];
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -784,7 +784,7 @@ where
|
||||||
was_partitioned = was_p;
|
was_partitioned = was_p;
|
||||||
|
|
||||||
// Split the slice into `left`, `pivot`, and `right`.
|
// 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, right) = right.split_at_mut(1);
|
||||||
let pivot = &pivot[0];
|
let pivot = &pivot[0];
|
||||||
|
|
||||||
|
@ -860,7 +860,7 @@ fn partition_at_index_loop<'a, T, F>(
|
||||||
let (mid, _) = partition(v, pivot, is_less);
|
let (mid, _) = partition(v, pivot, is_less);
|
||||||
|
|
||||||
// Split the slice into `left`, `pivot`, and `right`.
|
// 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, right) = right.split_at_mut(1);
|
||||||
let pivot = &pivot[0];
|
let pivot = &pivot[0];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue