summaryrefslogtreecommitdiff
path: root/src/sheet/loader/native/csv.rs
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2024-08-10 19:26:52 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2024-08-10 19:26:52 +0200
commitf4c019a200f548fcf28be5c8557572ab78a1e2e8 (patch)
tree44a23ca87f4e47248c3f59ad7382e8e0547bb832 /src/sheet/loader/native/csv.rs
parent5ff507db2f6667a0305e2382037710f6082d75da (diff)
code cleanup
Diffstat (limited to 'src/sheet/loader/native/csv.rs')
-rw-r--r--src/sheet/loader/native/csv.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sheet/loader/native/csv.rs b/src/sheet/loader/native/csv.rs
index 4a8f05d..6f81645 100644
--- a/src/sheet/loader/native/csv.rs
+++ b/src/sheet/loader/native/csv.rs
@@ -9,10 +9,8 @@ pub fn load_csv(path: String) -> Tablized {
let mut table = Vec::new();
- for result in csv_reader.records() {
- if let Ok(record) = result {
- table.push(record.iter().map(|s| Cell::from(s)).collect::<Vec<Cell>>())
- }
+ for record in csv_reader.records().flatten() {
+ table.push(record.iter().map(Cell::from).collect::<Vec<Cell>>())
}
Tablized::Vector(table)