Hacker News new | past | comments | ask | show | jobs | submit login

It doesn't have to be specified explicitly in this case, it can be inferred.

https://play.rust-lang.org/?version=stable&mode=debug&editio...

Probably just habit from GP to write out the return type, since collect so often can't be inferred. Or maybe to make it easier to change it to an intermediate value which you use ? with (at which point the type can no longer be inferred).

https://play.rust-lang.org/?version=stable&mode=debug&editio...




Yeah, apologies, that's just habit on my part.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: