Skip to content

Commit 6d4eb3e

Browse files
committed
update ch02-00
1 parent 9ab388b commit 6d4eb3e

File tree

29 files changed

+469
-641
lines changed

29 files changed

+469
-641
lines changed

listings/ch02-guessing-game-tutorial/listing-02-01/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
[package]
22
name = "guessing_game"
33
version = "0.1.0"
4-
authors = ["Your Name <you@example.com>"]
5-
edition = "2018"
4+
edition = "2021"
65

76
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
87

listings/ch02-guessing-game-tutorial/listing-02-02/Cargo.lock

Lines changed: 41 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
[package]
22
name = "guessing_game"
33
version = "0.1.0"
4-
authors = ["Your Name <you@example.com>"]
5-
edition = "2018"
4+
edition = "2021"
65

76
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
87

98
[dependencies]
10-
rand = "0.5.5"
9+
rand = "0.8.3"

listings/ch02-guessing-game-tutorial/listing-02-03/Cargo.lock

Lines changed: 41 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
[package]
22
name = "guessing_game"
33
version = "0.1.0"
4-
authors = ["Your Name <you@example.com>"]
5-
edition = "2018"
4+
edition = "2021"
65

76
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
87

98
[dependencies]
10-
rand = "0.5.5"
9+
rand = "0.8.3"

listings/ch02-guessing-game-tutorial/listing-02-03/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn main() {
88
println!("Guess the number!");
99

1010
// ANCHOR: ch07-04
11-
let secret_number = rand::thread_rng().gen_range(1, 101);
11+
let secret_number = rand::thread_rng().gen_range(1..101);
1212
// ANCHOR_END: ch07-04
1313

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

0 commit comments

Comments
 (0)