mirror of
https://github.com/uutils/coreutils
synced 2024-11-17 02:08:09 +00:00
join: simplify closure for line parsing
This commit is contained in:
parent
2a6d550f4b
commit
743a5b68ed
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ struct Line {
|
|||
|
||||
impl 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.
|
||||
|
|
Loading…
Reference in a new issue