We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
for...in
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http://doc.rust-lang.org/core/iter/trait.IntoIterator.html
I think we should mention somewhere in the docs for IntoIterator that implementing this trait allows one to write:
IntoIterator
let my_vec = vec![1, 10, 100]; for i in my_vec { ... }
instead of
let my_vec = vec![1, 10, 100]; for i in my_vec.iter() { ... }
The text was updated successfully, but these errors were encountered:
Fix up iterator documentation with regards to for loop sugar
cf56162
Fixes rust-lang#23851
What about an explanation of for x in &values and for x in &mut values?
for x in &values
for x in &mut values
Sorry, something went wrong.
That seems more of a conceptual, in-depth question that should probably be answered in the Book rather than API documentation
@FreeFull Or would be good in the top-level Iterator or Collections docs.
Successfully merging a pull request may close this issue.
http://doc.rust-lang.org/core/iter/trait.IntoIterator.html
I think we should mention somewhere in the docs for
IntoIterator
that implementing this trait allows one to write:instead of
The text was updated successfully, but these errors were encountered: