Skip to content

Commit bb31b39

Browse files
authored
Update exercises using the rand crate (#2126)
1 parent 465ae75 commit bb31b39

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

exercises/practice/robot-name/.meta/example.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{
33
sync::{Arc, Mutex},
44
};
55

6-
use rand::Rng;
6+
use rand::{Rng, RngExt as _};
77

88
fn generate_name<R: Rng>(rng: &mut R, used_names: &mut HashSet<String>) -> String {
99
loop {

exercises/practice/robot-name/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2024"
77
# The full list of available libraries is here:
88
# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml
99
[dependencies]
10-
rand = "0.9"
10+
rand = "0.10"
1111

1212
[lints.clippy]
1313
new_without_default = "allow"

exercises/practice/simple-cipher/.meta/example.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use rand::Rng;
1+
use rand::RngExt as _;
22

33
pub fn encode_random(s: &str) -> (String, String) {
44
let mut r = rand::rng();

exercises/practice/simple-cipher/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ edition = "2024"
77
# The full list of available libraries is here:
88
# https://github.com/exercism/rust-test-runner/blob/main/local-registry/Cargo.toml
99
[dependencies]
10-
rand = "0.9"
10+
rand = "0.10"

0 commit comments

Comments
 (0)