1. 53
    Rustlings iterators2: Introducing Iterators by manually calling .next and using .iter()
    1m 52s

Rustlings iterators2: Introducing Iterators by manually calling .next and using .iter()

InstructorChris Biscardi

Share this video with your friends

Send Tweet

README for this exercise.

input.chars() returns an iterator that we manually iterate through using .next().

Later in the program we take advantage of .iter() and the turbofish to reuse the same code across two different use cases.

Also note that an alternative solution is possible where the character uppercase function returns an iterator that is then collected()