diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-01-31 07:00:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-31 07:00:46 +0100 |
| commit | 24737bd1abaf5955905cc153ec8ec4bdef074d3f (patch) | |
| tree | 3656c6e799c29cd2bd850553b1cff0629a7d6c3c | |
| parent | b0cdf7e995c3b5da77ce7a71bd27cdde4e2f7720 (diff) | |
| parent | cde240c1e816f2f24de0ec3d674d4d029582b700 (diff) | |
| download | rust-24737bd1abaf5955905cc153ec8ec4bdef074d3f.tar.gz rust-24737bd1abaf5955905cc153ec8ec4bdef074d3f.zip | |
Rollup merge of #93485 - est31:remove_curly, r=joshtriplett
core: Remove some redundant {}s from the sorting code
| -rw-r--r-- | library/core/src/slice/sort.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/core/src/slice/sort.rs b/library/core/src/slice/sort.rs index 8f58e8897b3..2ba0e5320d7 100644 --- a/library/core/src/slice/sort.rs +++ b/library/core/src/slice/sort.rs @@ -773,7 +773,7 @@ where 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 @@ where 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]; |
