The former phrasing seemed to suggest that we _must not_ annotate types _unless_ there are multiple possibilities.
In fact, we are allowed to add redundant annotations.
Cases where no annotation is needed _despite_ multiple possible types -- e.g. `let n = 8` -- are, presumably, intentionally left out here, so not touching that.
The code as actually written *did* conform to the expetaction of the
text, but only because it was in a `lib.rs` file and so in a module
distinct from the scope directly accessible from `main.rs`; as shown in
the text presentation, however, it was not obvious that it was in a
`lib.rs`, and that detail was elided.
Rename the `lib.rs` to `guessing_game.rs` and declare it as a module in
the `main.rs` file, update the `Listing` to name it, and update the text
to call out the creation of the module.
"By following the help text’s suggestion, we restrict..." and "...and this example will compile..." imply to the reader that after this paragraph, they can expect to see a corrected code example. This rewording, though somewhat subtle, clarfies how the code example *would* be fixed by following the compiler's help message.
"we'll fix it later in this chapter" somewhat implies that a correct code example will be provided later; "later in this chapter" also implies "quite a bit later", when the fix is actually discussed very shortly after the non-compiling code is presented
Twitter is now X, who knows what 'tweets' are called, and whether *any*
of the current crop of social media platforms will exist by the time the
2027 or 2030 editions of Rust roll around, who knows?
This is a tricky thing to get “just right”, and I am not *totally* happy
with this solution, but I think it’s actually better without the “as a
whole” given the addition of the sentence at the end indicating that its
fields can still be accessed.
In Table B-8, instead of treating “tuples” as the primary concern, treat
parentheses as primary and tuples as one of the contexts. Move the tuple
index access to live alongside field and method access.
The issue is while in std::io::stdin:
std is the standard library in Rust.
io is a module within the std library.
stdin is a function within the io module, but the book said "io library" it does confused too much as a newbie the user won't impose his thoughts for a moment he/she will rather trust the BOOK that ::io is indeed a library (with confusion in his mind). so it needs to be fixed.
Adding underscore to the start of an unused variable name is no longer
`MachineApplicable`, so the example no longer works.
This changes it to use `unused_mut` instead.