Convert A Vec Of Tuples Into A Vec Of Another Type In Rust


This function takes in a vec of tuples that contain string slices that look like this:

and converts it into a vec of string slices (pulled from the second tuple item) that looks like this:


Here's the code:


Here's the verification:

I've added the `::<<`` turbofish to `.collect()`` in the `convert`` funciton. Sometimes it's necessary, sometimes it's not. In this case, the code would work without it like this:

I'm not sure at what points those would be required and what points it's not so I defaulted to including them in the example.