about summary refs log tree commit diff
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2022-01-30 18:32:24 +0100
committerest31 <MTest31@outlook.com>2022-01-30 18:32:24 +0100
commitcde240c1e816f2f24de0ec3d674d4d029582b700 (patch)
tree447cf3e0093d401b5a2d578a421e2ad918a0c15c
parent7cc28c128be0363d83accf318b87b40ba6168384 (diff)
downloadrust-cde240c1e816f2f24de0ec3d674d4d029582b700.tar.gz
rust-cde240c1e816f2f24de0ec3d674d4d029582b700.zip
core: Remove some redundant {}s from the sorting code
-rw-r--r--library/core/src/slice/sort.rs6
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];