Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ci/dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ retweet
rewordings
rint
ripgrep
RngExt
Rumbul
runnable
runtime
Expand Down
131 changes: 34 additions & 97 deletions listings/ch02-guessing-game-tutorial/listing-02-02/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ edition = "2024"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
rand = "0.8.5"
rand = "0.10.1"
70 changes: 36 additions & 34 deletions listings/ch02-guessing-game-tutorial/listing-02-03/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ edition = "2024"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
rand = "0.8.5"
rand = "0.10.1"
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
use std::io;

// ANCHOR: ch07-04
use rand::Rng;
use rand::prelude::*;

fn main() {
// ANCHOR_END: ch07-04
println!("Guess the number!");

// ANCHOR: ch07-04
let secret_number = rand::thread_rng().gen_range(1..=100);
let secret_number = rand::rng().random_range(1..=100);
// ANCHOR_END: ch07-04

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