1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

join: simplify closure for line parsing

This commit is contained in:
Konstantin Pospelov 2017-12-18 10:40:15 +03:00
parent 2a6d550f4b
commit 743a5b68ed

View file

@ -53,7 +53,7 @@ struct Line {
impl Line { impl Line {
fn new(string: String) -> Line { fn new(string: String) -> Line {
Line { fields: string.split_whitespace().map(|s| String::from(s)).collect() } Line { fields: string.split_whitespace().map(String::from).collect() }
} }
/// Get field at index. /// Get field at index.