From 4cde86643e12db162a66e62f23b78962986046ac Mon Sep 17 00:00:00 2001 From: Niklas Anderson Date: Fri, 9 Aug 2019 07:28:35 -0700 Subject: [PATCH 1/2] fix(iterators2): Remove syntax resulting in misleading error message closes #199 --- exercises/standard_library_types/iterators2.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/standard_library_types/iterators2.rs b/exercises/standard_library_types/iterators2.rs index d102dc9..b25d0d6 100644 --- a/exercises/standard_library_types/iterators2.rs +++ b/exercises/standard_library_types/iterators2.rs @@ -9,7 +9,7 @@ pub fn capitalize_first(input: &str) -> String { let mut c = input.chars(); match c.next() { None => String::new(), - Some(first) => first.collect()::() + c.as_str(), + Some(first) => first.collect::() + c.as_str(), } } From e3931718fb7a4355f6fb99a297157df9c03ba694 Mon Sep 17 00:00:00 2001 From: Niklas Anderson Date: Fri, 9 Aug 2019 07:36:39 -0700 Subject: [PATCH 2/2] chore(iterators2): Add exercise instructions --- exercises/standard_library_types/iterators2.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/standard_library_types/iterators2.rs b/exercises/standard_library_types/iterators2.rs index b25d0d6..168368f 100644 --- a/exercises/standard_library_types/iterators2.rs +++ b/exercises/standard_library_types/iterators2.rs @@ -1,7 +1,7 @@ // iterators2.rs // In this module, you'll learn some of unique advantages that iterators can offer // Step 1. Complete the `capitalize_first` function to pass the first two cases -// Step 2. Apply the `capitalize_first` function to a vector of strings, ensuring that it +// Step 2. Apply the `capitalize_first` function to a vector of strings, ensuring that it returns a vector of strings as well // Step 3. Apply the `capitalize_first` function again to a list, but try and ensure it returns a single string // As always, there are hints below!