1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-06-15 00:04:58 +02:00

iterators1 solution

This commit is contained in:
mo8it
2024-06-28 02:07:56 +02:00
parent 746cf6863d
commit cf9041c0e4
3 changed files with 36 additions and 27 deletions

View File

@ -886,22 +886,9 @@ https://doc.rust-lang.org/stable/book/ch11-01-writing-tests.html#checking-for-pa
name = "iterators1"
dir = "18_iterators"
hint = """
Step 1:
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:
https://doc.rust-lang.org/std/vec/struct.Vec.html
Step 2 & step 3:
Very similar to the lines above and below. You've got this!
Step 4:
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
https://doc.rust-lang.org/std/iter/trait.Iterator.html for some ideas."""
https://doc.rust-lang.org/std/iter/trait.Iterator.html"""
[[exercises]]
name = "iterators2"