Skip to content

Commit 7a11ea8

Browse files
committed
guessing game consistency
1 parent 1197d3b commit 7a11ea8

File tree

2 files changed

+2
-2
lines changed
  • listings/ch02-guessing-game-tutorial

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fn main() {
2525
// ANCHOR_END: expect
2626

2727
// ANCHOR: print_guess
28-
println!("You guessed: {guess}");
28+
println!("You guessed: {}", guess);
2929
// ANCHOR_END: print_guess
3030
}
3131
// ANCHOR: all

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ fn main() {
1111
.read_line(&mut guess)
1212
.expect("Failed to read line");
1313

14-
println!("You guessed: {guess}");
14+
println!("You guessed: {}", guess);
1515
}

0 commit comments

Comments
 (0)