Commit f0f1e8c
committed
csv: address review feedback
- Remove the redundant per-branch sentinel terminator setup in to_writer;
the unconditional terminator call after the match is the single source.
- Reword the empty-lineterminator errors to "must not be empty" (the
constraint is non-empty, not single-character) on both entry points.
- Promote the sentinel invariant check in writerow from debug_assert_eq!
to assert_eq! so it also guards release builds.
- Add a snippet case for a field containing a line-break byte to ensure
the csv-core path drops only the trailing terminator.1 parent f297947 commit f0f1e8c
2 files changed
Lines changed: 14 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
| 234 | + | |
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| |||
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
629 | | - | |
| 629 | + | |
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
| |||
867 | 867 | | |
868 | 868 | | |
869 | 869 | | |
870 | | - | |
871 | | - | |
| 870 | + | |
872 | 871 | | |
873 | 872 | | |
874 | 873 | | |
| |||
884 | 883 | | |
885 | 884 | | |
886 | 885 | | |
887 | | - | |
888 | | - | |
| 886 | + | |
889 | 887 | | |
890 | 888 | | |
891 | 889 | | |
| |||
1584 | 1582 | | |
1585 | 1583 | | |
1586 | 1584 | | |
1587 | | - | |
| 1585 | + | |
1588 | 1586 | | |
1589 | 1587 | | |
1590 | 1588 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
222 | 231 | | |
223 | 232 | | |
224 | 233 | | |
| |||
0 commit comments