Skip to content

Commit 487778b

Browse files
committed
Use ptr::sub
1 parent a9a64db commit 487778b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/slice/quicksort.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ where
372372

373373
if start_r == end_r {
374374
// All out-of-order elements in the right block were moved. Move to the previous block.
375-
r = unsafe { r.offset(-(block_r as isize)) };
375+
r = unsafe { r.sub(block_r) };
376376
}
377377

378378
if is_done {

0 commit comments

Comments
 (0)