1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-11-29 22:47:43 +02:00

iterators3 solution

This commit is contained in:
mo8it
2024-06-28 15:00:13 +02:00
parent eddbb97934
commit 56a9197f55
3 changed files with 92 additions and 43 deletions

View File

@@ -922,8 +922,8 @@ powerful and very general. Rust just needs to know the desired type."""
name = "iterators3"
dir = "18_iterators"
hint = """
The `divide` function needs to return the correct error when even division is
not possible.
The `divide` function needs to return the correct error when the divisor is 0 or
when even division is not possible.
The `division_results` variable needs to be collected into a collection type.
@@ -934,7 +934,7 @@ The `list_of_results` function needs to return a vector of results.
See https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.collect for
how the `FromIterator` trait is used in `collect()`. This trait is REALLY
powerful! It can make the solution to this exercise infinitely easier."""
powerful! It can make the solution to this exercise much easier."""
[[exercises]]
name = "iterators4"