Skip to content

Commit 471e655

Browse files
committed
doc: fix inconsistency in error output in guessing-game.md
The line '.expect("failed to read line");' is partly started with a lower case 'f' and partly with an uppercase one, adding additional spurious changes to otherwise clean diffs if each sample is copy-and-pasted over the previous. This change starts the string with an uppercase everywhere which is in line with the style of the other strings.
1 parent 2f52386 commit 471e655

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/doc/book/src/guessing-game.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ and other whitespace. This helps you split up long lines. We _could_ have
255255
done:
256256

257257
```rust,ignore
258-
io::stdin().read_line(&mut guess).expect("failed to read line");
258+
io::stdin().read_line(&mut guess).expect("Failed to read line");
259259
```
260260

261261
But that gets hard to read. So we’ve split it up, two lines for two method
@@ -473,7 +473,7 @@ fn main() {
473473
let mut guess = String::new();
474474
475475
io::stdin().read_line(&mut guess)
476-
.expect("failed to read line");
476+
.expect("Failed to read line");
477477
478478
println!("You guessed: {}", guess);
479479
}
@@ -563,7 +563,7 @@ fn main() {
563563
let mut guess = String::new();
564564
565565
io::stdin().read_line(&mut guess)
566-
.expect("failed to read line");
566+
.expect("Failed to read line");
567567
568568
println!("You guessed: {}", guess);
569569
@@ -678,7 +678,7 @@ fn main() {
678678
let mut guess = String::new();
679679

680680
io::stdin().read_line(&mut guess)
681-
.expect("failed to read line");
681+
.expect("Failed to read line");
682682

683683
let guess: u32 = guess.trim().parse()
684684
.expect("Please type a number!");
@@ -780,7 +780,7 @@ fn main() {
780780
let mut guess = String::new();
781781
782782
io::stdin().read_line(&mut guess)
783-
.expect("failed to read line");
783+
.expect("Failed to read line");
784784
785785
let guess: u32 = guess.trim().parse()
786786
.expect("Please type a number!");
@@ -847,7 +847,7 @@ fn main() {
847847
let mut guess = String::new();
848848
849849
io::stdin().read_line(&mut guess)
850-
.expect("failed to read line");
850+
.expect("Failed to read line");
851851
852852
let guess: u32 = guess.trim().parse()
853853
.expect("Please type a number!");
@@ -892,7 +892,7 @@ fn main() {
892892
let mut guess = String::new();
893893
894894
io::stdin().read_line(&mut guess)
895-
.expect("failed to read line");
895+
.expect("Failed to read line");
896896
897897
let guess: u32 = match guess.trim().parse() {
898898
Ok(num) => num,
@@ -981,7 +981,7 @@ fn main() {
981981
let mut guess = String::new();
982982
983983
io::stdin().read_line(&mut guess)
984-
.expect("failed to read line");
984+
.expect("Failed to read line");
985985
986986
let guess: u32 = match guess.trim().parse() {
987987
Ok(num) => num,

0 commit comments

Comments
 (0)