about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-01-31 07:00:46 +0100
committerGitHub <noreply@github.com>2022-01-31 07:00:46 +0100
commit24737bd1abaf5955905cc153ec8ec4bdef074d3f (patch)
tree3656c6e799c29cd2bd850553b1cff0629a7d6c3c
parentb0cdf7e995c3b5da77ce7a71bd27cdde4e2f7720 (diff)
parentcde240c1e816f2f24de0ec3d674d4d029582b700 (diff)
downloadrust-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.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];