You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am learning rust and I find every single line of code is explained properly. Great job! unfortunately was going through chapter 3.5 "Looping Through a Collection with for" section. The iter() method is not explained.
This is just to maintain consistency in quality of the rust docs :)
There is an entire chapter that deals with iterators that follows (Chapter 13).
Chapter 3.5 just has a short example of how to iterate through the array. The chapter's focus is not iterators.
I think it should either be left as-is, or a short note can be added that says something like "we'll take a closer look at iterators in Chapter 13".
(Yes, and this is part of the reason it wasn't explained; I didn't want to do a bunch here when it would eventually be unneeded, and most people seemed to intuitively get what was going on.)
Activity
tal-zvon commentedon Apr 3, 2021
There is an entire chapter that deals with iterators that follows (Chapter 13).
Chapter 3.5 just has a short example of how to iterate through the array. The chapter's focus is not iterators.
I think it should either be left as-is, or a short note can be added that says something like "we'll take a closer look at iterators in Chapter 13".
faraaz-baig commentedon Apr 3, 2021
A Short note will do a great job!
carols10cents commentedon Jul 14, 2021
Soon the
itermethod won't be needed in this example! https://blog.rust-lang.org/2021/05/11/edition-2021.html#intoiterator-for-arrays I'm leaving this issue open as we're going to fix this by removingiterwhen the new functionality is stable.steveklabnik commentedon Jul 15, 2021
(Yes, and this is part of the reason it wasn't explained; I didn't want to do a bunch here when it would eventually be unneeded, and most people seemed to intuitively get what was going on.)
This iter isn't needed anymore! Fixes #2672.