First code example regarding stdin emits a warning #99654
Labels
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
C-bug
Category: This is a bug.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
What needs to be fixed?
The very first code example on the page in the docs regarding
stdin
is confusing because, using Rust 1.6.2, when executing the line with the comment// We get Stdin here
appended, the warning "variable does not need to be mutable" is emitted.Page(s) Affected
https://doc.rust-lang.org/std/io/struct.Stdin.html
Suggested Improvement
If the need for a mutable became unnecessasry as of a particular Rust version, perhaps add a comment to that effect
The text was updated successfully, but these errors were encountered: