Option<Fn> fails to compile

Neither are special. The turbofish can contain any type, and _ can be used to infer any type, too. (Well, when it can be inferred, that is.)

As for collect, you definitely don't have to write the full type unless an iterator has an ambiguous item type for some reason (very rare). For the most part, .collect::<Vec<_>>() works just fine.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.