Skip to content

Commit 0336b35

Browse files
committed
chore: Update to rand 0.8
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
1 parent f512d8a commit 0336b35

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ opener = "0.4.0"
4444
# by our rustup.
4545
openssl = {version = "0.10", optional = true}
4646
pulldown-cmark = {version = "0.8", default-features = false}
47-
rand = "0.7"
47+
rand = "0.8"
4848
regex = "1"
4949
remove_dir_all = "0.6.0"
5050
same-file = "1"

src/currentprocess.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ impl TestProcess {
220220
fn new_id() -> u64 {
221221
let low_bits: u64 = std::process::id() as u64;
222222
let mut rng = thread_rng();
223-
let high_bits = rng.gen_range(0, u32::MAX) as u64;
223+
let high_bits = rng.gen_range(0..u32::MAX) as u64;
224224
high_bits << 32 | low_bits
225225
}
226226

src/utils/raw.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub fn random_string(length: usize) -> String {
4040
const CHARSET: &[u8] = b"abcdefghijklmnopqrstuvwxyz0123456789_";
4141
let mut rng = rand::thread_rng();
4242
(0..length)
43-
.map(|_| char::from(CHARSET[rng.gen_range(0, CHARSET.len())]))
43+
.map(|_| char::from(CHARSET[rng.gen_range(0..CHARSET.len())]))
4444
.collect()
4545
}
4646

0 commit comments

Comments
 (0)