[rust-dev] read file line by line

Masklinn masklinn at masklinn.net
Wed Apr 4 08:17:43 PDT 2012


On 4 avr. 2012, at 17:09, Eric Holk <eric.holk at gmail.com> wrote:
> In Rust, you can do something like this instead:
> 
>    let parts = vec::map([" a", "b ", " c ", "d"]) {|s|
>        str::trim(s)
>    };

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


More information about the Rust-dev mailing list