mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-22 22:02:22 -05:00
Merge pull request #1210 from cj81499/iterators1-hint
improve hint for iterators1
This commit is contained in:
commit
6174b5caf0
1 changed files with 2 additions and 2 deletions
|
@ -818,9 +818,9 @@ Step 1:
|
||||||
We need to apply something to the collection `my_fav_fruits` before we start to go through
|
We need to apply something to the collection `my_fav_fruits` before we start to go through
|
||||||
it. What could that be? Take a look at the struct definition for a vector for inspiration:
|
it. What could that be? Take a look at the struct definition for a vector for inspiration:
|
||||||
https://doc.rust-lang.org/std/vec/struct.Vec.html.
|
https://doc.rust-lang.org/std/vec/struct.Vec.html.
|
||||||
Step 2 & step 2.1:
|
Step 2 & step 3:
|
||||||
Very similar to the lines above and below. You've got this!
|
Very similar to the lines above and below. You've got this!
|
||||||
Step 3:
|
Step 4:
|
||||||
An iterator goes through all elements in a collection, but what if we've run out of
|
An iterator goes through all elements in a collection, but what if we've run out of
|
||||||
elements? What should we expect here? If you're stuck, take a look at
|
elements? What should we expect here? If you're stuck, take a look at
|
||||||
https://doc.rust-lang.org/std/iter/trait.Iterator.html for some ideas.
|
https://doc.rust-lang.org/std/iter/trait.Iterator.html for some ideas.
|
||||||
|
|
Loading…
Reference in a new issue