Skip to content

Commit 29db4dd

Browse files
clippy fix and DIRECTORY.md
1 parent c43d98c commit 29db4dd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

DIRECTORY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@
298298
* [Insertion Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/insertion_sort.rs)
299299
* [Intro Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/intro_sort.rs)
300300
* [Merge Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/merge_sort.rs)
301+
* [Merge Sort Inplace](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/merge_sort_inplace.rs)
301302
* [Odd Even Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/odd_even_sort.rs)
302303
* [Pancake Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/pancake_sort.rs)
303304
* [Patience Sort](https://github.com/TheAlgorithms/Rust/blob/master/src/sorting/patience_sort.rs)

src/sorting/merge_sort_inplace.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ fn merge<T: Ord>(array: &mut [T], mid: usize) {
44
let mut right = mid;
55

66
while left < right && right < len {
7-
if &array[left] < &array[right] {
7+
if array[left] < array[right] {
88
left += 1;
99
} else {
1010
let tmp = right;
11-
while right < len && &array[left] > &array[right] {
11+
while right < len && array[left] > array[right] {
1212
right += 1;
1313
}
1414
let rotate_mid = tmp - left;

0 commit comments

Comments
 (0)