Skip to content

Commit

Permalink
core/doc: correct Writer::delimiter guarantee
Browse files Browse the repository at this point in the history
Previously, the docs said it only ever writes at most 1 byte. However,
if delimiter is called while quoting, then it may write the end of the quote
as well.

PR #192
  • Loading branch information
golddranks committed Feb 14, 2020
1 parent c283b57 commit d8eae7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion csv-core/src/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ impl Writer {
/// a field delimiter, then nothing is written to `output`
/// and `WriteResult::OutputFull` is returned. Otherwise,
/// `WriteResult::InputEmpty` is returned along with the number of bytes
/// written to `output` (which is always `1`).
/// written to `output` (which is `1` in case of an unquoted
/// field, or `2` in case of an end quote and a field separator).
pub fn delimiter(
&mut self,
mut output: &mut [u8],
Expand Down

0 comments on commit d8eae7b

Please sign in to comment.