Skip to content

Commit f83af3c

Browse files
committed
Auto merge of #207 - nkanderson:fix_iterators2, r=komaeda
Fix iterators2 A couple of small changes to the `iterators2` exercise. @Jesse-Cameron, it looks like you contributed this exercise, so I wanted to check and see if these changes are in line with your intentions. Happy to adjust if they're not :)
2 parents e696a07 + e393171 commit f83af3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exercises/standard_library_types/iterators2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// iterators2.rs
22
// In this module, you'll learn some of unique advantages that iterators can offer
33
// Step 1. Complete the `capitalize_first` function to pass the first two cases
4-
// Step 2. Apply the `capitalize_first` function to a vector of strings, ensuring that it
4+
// Step 2. Apply the `capitalize_first` function to a vector of strings, ensuring that it returns a vector of strings as well
55
// Step 3. Apply the `capitalize_first` function again to a list, but try and ensure it returns a single string
66
// As always, there are hints below!
77

88
pub fn capitalize_first(input: &str) -> String {
99
let mut c = input.chars();
1010
match c.next() {
1111
None => String::new(),
12-
Some(first) => first.collect()::<String>() + c.as_str(),
12+
Some(first) => first.collect::<String>() + c.as_str(),
1313
}
1414
}
1515

0 commit comments

Comments
 (0)