The code for setting the guess:
```(rust)
io::stdin().read_line(&mut guess)
.expect("Failed to read line");
Then running `rustfmt main.rs` re-formats the code:
```(rust)
io::stdin()
.read_line(&mut guess)
.expect("Failed to read line");
This is just the first one that I came across.
The code sample _seems_ to be formatted incorrectly according to rustfmt. For new learners, it would be nice to present correctly formatted code from the outset.
If this is something that needs to be done, I'd be happy to run each sample through rustfmt and make the suggested changes. If not, no worries and thanks for the great resource!
@parhaml I'd be open to patches to merging patches that format the code examples using rustfmt; I think your reasoning here makes a lot of sense!
Closing this issue in favor of
https://github.com/rust-lang/book/issues/1690
Most helpful comment
Closing this issue in favor of
https://github.com/rust-lang/book/issues/1690