Skip to content

Commit

Permalink
fst-bin: don't skip headers
Browse files Browse the repository at this point in the history
We don't skip headers for 'fst set' or 'fst map --sorted'.
Interestingly, we did skip them for a just plain 'fst map'. The end
affect is that FSTs built with 'fst map' would be missing the first row
from the source CSV file.

Fixes #69
  • Loading branch information
BurntSushi committed Feb 21, 2020
1 parent 14940c8 commit 4993d14
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fst-bin/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ impl Iterator for ConcatCsv {
Err(err) => return Some(Err(From::from(err))),
Ok(rdr) => rdr,
};
let csvrdr = csv::Reader::from_reader(rdr);
let csvrdr = csv::ReaderBuilder::new()
.has_headers(false)
.from_reader(rdr);
self.cur = Some(csvrdr.into_deserialize());
}
}
Expand Down

0 comments on commit 4993d14

Please sign in to comment.