[rust-dev] read file line by line

Marijn Haverbeke marijnh at gmail.com
Wed Apr 4 12:16:07 PDT 2012


> Isn't it possible to pass str::trim directly to vec::map? It the indirection through the block really needed?

Currently it is, due to argument modes (map takes a function that
expects its argument by-reference, str::split takes it by value).
We're hopeful that we've found a way to get rid of this restriction,
once the region work is more complete, but it might take a while
before all that is implemented.


More information about the Rust-dev mailing list