What version of the csv crate are you using?
master: fcdbea357739348b9eed2a0239e180213be78af9
Briefly describe the question, bug or feature request.
As mentioned in this issue of xsv, it seems that rust-csv is flushing the underlying writer when its internal buffer becomes full. This causes issues for xsv as the underlying writer is a TabWriter and calling flush causes side-effects other than writing out the buffer (specifically, it resets the internal state, "breaking" alignment of subsequently written data)
Include a complete program demonstrating a problem.
The reproduction with xsv is attached on the linked issue - using a small rust-csv buffer size leads to broken tabular layout.
What is the expected or desired behavior of the code above?
When the internal buffer becomes full, its contents should be written to the underlying writer, but the underlying writer should not be flushed. This seems to match with other buffering IO libraries, such as BufferedWriter in Java and rust's stdlib
What version of the
csvcrate are you using?master:
fcdbea357739348b9eed2a0239e180213be78af9Briefly describe the question, bug or feature request.
As mentioned in this issue of
xsv, it seems that rust-csv is flushing the underlying writer when its internal buffer becomes full. This causes issues forxsvas the underlying writer is aTabWriterand callingflushcauses side-effects other than writing out the buffer (specifically, it resets the internal state, "breaking" alignment of subsequently written data)Include a complete program demonstrating a problem.
The reproduction with
xsvis attached on the linked issue - using a smallrust-csvbuffer size leads to broken tabular layout.What is the expected or desired behavior of the code above?
When the internal buffer becomes full, its contents should be written to the underlying writer, but the underlying writer should not be
flushed. This seems to match with other buffering IO libraries, such asBufferedWriterin Java and rust's stdlib