It wouldn’t be as relevant, since passing a function or method instead of a closure is much easier in Rust - you can just name it, while Ruby requires you to use the method method.
So instead of .map(|res| res.unwrap()) you can do .map(Result::unwrap) and it’ll Just Work™.
Damn, I wish rust had that
It wouldn’t be as relevant, since passing a function or method instead of a closure is much easier in Rust - you can just name it, while Ruby requires you to use the
methodmethod.So instead of
.map(|res| res.unwrap())you can do.map(Result::unwrap)and it’ll Just Work™.Except when Type::Method takes a reference, then it doesn’t just work
I’m glad it doesnt.
Swift does, though using the dollar sign rather than underscores
I sincerely doubt Rust would ever add something like this.