The docs for QuoteStyle::Never say:
This never writes quotes, even if it would produce invalid CSV data.
Based on that, I would expect the following program to output a line with foo followed by an empty line, followed by a line with bar,baz:
fn main() {
let mut writer = csv::WriterBuilder::new()
.quote_style(csv::QuoteStyle::Never)
.from_path("/dev/stdout")
.unwrap();
writer.write_record(["foo"]).unwrap();
writer.write_record([""]).unwrap();
writer.write_record(["bar,baz"]).unwrap();
}
Expected output:
But actual output is:
Is there a way to prevent the writer from generating quotes?
I am using csv 1.1.6.
The docs for
QuoteStyle::Neversay:Based on that, I would expect the following program to output a line with
foofollowed by an empty line, followed by a line withbar,baz:Expected output:
But actual output is:
Is there a way to prevent the writer from generating quotes?
I am using csv 1.1.6.