Skip to content

Commit

Permalink
Update main.rs
Browse files Browse the repository at this point in the history
updated the deprecated functions
  • Loading branch information
lutherleo authored Feb 19, 2025
1 parent de0dc46 commit aad241a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::io;
fn main() {
println!("Guess the number!");

let secret_number = rand::thread_rng().gen_range(1..=100);
let secret_number = rand::rng().random_range(1..=100);

println!("The secret number is: {secret_number}");

Expand Down

0 comments on commit aad241a

Please sign in to comment.