diff options
| author | est31 <MTest31@outlook.com> | 2022-01-30 18:32:24 +0100 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2022-01-30 18:32:24 +0100 |
| commit | cde240c1e816f2f24de0ec3d674d4d029582b700 (patch) | |
| tree | 447cf3e0093d401b5a2d578a421e2ad918a0c15c | |
| parent | 7cc28c128be0363d83accf318b87b40ba6168384 (diff) | |
| download | rust-cde240c1e816f2f24de0ec3d674d4d029582b700.tar.gz rust-cde240c1e816f2f24de0ec3d674d4d029582b700.zip | |
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]; |
