Skip to content

Commit

Permalink
Rollup merge of #93485 - est31:remove_curly, r=joshtriplett
Browse files Browse the repository at this point in the history
core: Remove some redundant {}s from the sorting code
  • Loading branch information
matthiaskrgr authored Jan 30, 2022
2 parents 6007644 + cde240c commit 060bfcf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/core/src/slice/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand All @@ -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];

Expand Down Expand Up @@ -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];

Expand Down

0 comments on commit 060bfcf

Please sign in to comment.