Hacker News new | ask | show | jobs
by DasIch 3625 days ago
The method whose to_string method you want to reference isn't in scope. You need a function that calls the method on the argument it's called with.

Why add a feature for this - worse syntax, if you can just use an anonymous function?

Rust is already not the simplest of languages, adding further syntax and features of questionable benefit won't make the language any simpler or easier to understand.

1 comments

Because repeated "|x| x" is a common noise pattern.