Skip to content

Commit 16fa956

Browse files
committed
Upgrade rand to 0.8.3
1 parent a1d9cfe commit 16fa956

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ndarray = "0.14"
2020
noisy_float = "0.2.0"
2121
num-integer = "0.1"
2222
num-traits = "0.2"
23-
rand = "0.7"
23+
rand = "0.8.3"
2424
itertools = { version = "0.10.0", default-features = false }
2525
indexmap = "1.6.2"
2626

src/sort.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ where
116116
self[0].clone()
117117
} else {
118118
let mut rng = thread_rng();
119-
let pivot_index = rng.gen_range(0, n);
119+
let pivot_index = rng.gen_range(0..n);
120120
let partition_index = self.partition_mut(pivot_index);
121121
if i < partition_index {
122122
self.slice_axis_mut(Axis(0), Slice::from(..partition_index))
@@ -251,7 +251,7 @@ fn _get_many_from_sorted_mut_unchecked<A>(
251251

252252
// We pick a random pivot index: the corresponding element is the pivot value
253253
let mut rng = thread_rng();
254-
let pivot_index = rng.gen_range(0, n);
254+
let pivot_index = rng.gen_range(0..n);
255255

256256
// We partition the array with respect to the pivot value.
257257
// The pivot value moves to `array_partition_index`.

0 commit comments

Comments
 (0)