mirror of
https://github.com/nushell/nushell
synced 2024-12-28 05:53:09 +00:00
Updates return types.
This commit is contained in:
parent
a9293f62a8
commit
104b7824f5
1 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@ impl WholeStreamCommand for FromSSV {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn string_to_table(s: &str, headerless: bool) -> std::iter::Map<Vec<(String, String)>> {
|
fn string_to_table(s: &str, headerless: bool) -> Vec<Vec<(String, String)>> {
|
||||||
let mut lines = s.lines().filter(|l| !l.trim().is_empty());
|
let mut lines = s.lines().filter(|l| !l.trim().is_empty());
|
||||||
|
|
||||||
let headers = lines
|
let headers = lines
|
||||||
|
@ -51,7 +51,7 @@ fn string_to_table(s: &str, headerless: bool) -> std::iter::Map<Vec<(String, Str
|
||||||
headers
|
headers
|
||||||
};
|
};
|
||||||
|
|
||||||
lines.map(|l| header_row.iter().zip(l.split_whitespace()))
|
lines.map(|l| header_row.iter().zip(l.split_whitespace())).collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn from_ssv_string_to_value(
|
fn from_ssv_string_to_value(
|
||||||
|
|
Loading…
Reference in a new issue