mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
join: simplify closure for line parsing
This commit is contained in:
+1
-1
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user