summaryrefslogtreecommitdiff
path: root/info.toml
diff options
context:
space:
mode:
authormarisa <mokou@fastmail.com>2021-04-20 11:24:10 +0200
committerGitHub <noreply@github.com>2021-04-20 11:24:10 +0200
commit2b766ef9f9ee36a5fac198b5e95a4be03a62bfe2 (patch)
tree835f71694791864f805e5e8d2d265f0049fefc14 /info.toml
parentbd3d9ac9d57b67bb874310de3588f872b849d423 (diff)
parentbaf4ba175ba6eb92989e3dd54ecbec4bedc9a863 (diff)
Merge pull request #648 from apogeeoak/iterator2
Moved iterators2.rs errors out of tests.
Diffstat (limited to 'info.toml')
-rw-r--r--info.toml19
1 files changed, 9 insertions, 10 deletions
diff --git a/info.toml b/info.toml
index 227b267..4dd23bd 100644
--- a/info.toml
+++ b/info.toml
@@ -704,21 +704,20 @@ path = "exercises/standard_library_types/iterators2.rs"
mode = "test"
hint = """
Step 1
-You need to call something on `first` before it can be collected
-Currently its type is `char`. Have a look at the methods that are available on that type:
+The variable `first` is a `char`. It needs to be capitalized and added to the
+remaining characters in `c` in order to return the correct `String`.
+The remaining characters in `c` can be viewed as a string slice using the
+`as_str` method.
+The documentation for `char` contains many useful methods.
https://doc.rust-lang.org/std/primitive.char.html
-
Step 2
-First you'll need to turn the Vec into an iterator
-Then you'll need to apply your function unto each item in the vector
-P.s. Don't forget to collect() at the end!
-
+Create an iterator from the slice. Transform the iterated values by applying
+the `capitalize_first` function. Remember to collect the iterator.
Step 3.
-This is very similar to the previous test. The only real change is that you will need to
-alter the type that collect is coerced into. For a bonus you could try doing this with a
-turbofish"""
+This is surprising similar to the previous solution. Collect is very powerful
+and very general. Rust just needs to know the desired type."""
[[exercises]]
name = "iterators3"