You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Briefly describe the question, bug or feature request.
When the last line of the csv data is a comment, deserialization results in a CSV error stating that the found record does not have the appropriate number of fields when the expectation is that the line should be ignored all together since it starts with the comment character. Example error message: CSV error: record 2 (line: 5, byte: 70): found record with 1 fields, but the previous record has 3 fields
Include a complete program demonstrating a problem.
Standard Output
Beginning test case: Content ends with a record.
Test case finished.
Beginning test case: Content ends with a newline.
Test case finished.
Beginning test case: Content ends with an #Comment then newline.
Test case finished.
Beginning test case: Content ends with an #Comment.
CSV error: record 2 (line: 5, byte: 70): found record with 1 fields, but the previous record has 3 fields
What is the expected or desired behavior of the code above?
Standard output should be:
Beginning test case: Content ends with a record.
Test case finished.
Beginning test case: Content ends with a newline.
Test case finished.
Beginning test case: Content ends with an #Comment then newline.
Test case finished.
Beginning test case: Content ends with an #Comment.
Test case finished.
The text was updated successfully, but these errors were encountered:
What version of the
csv
crate are you using?csv 1.3.0
Briefly describe the question, bug or feature request.
When the last line of the csv data is a comment, deserialization results in a CSV error stating that the found record does not have the appropriate number of fields when the expectation is that the line should be ignored all together since it starts with the comment character. Example error message: CSV error: record 2 (line: 5, byte: 70): found record with 1 fields, but the previous record has 3 fields
Include a complete program demonstrating a problem.
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=62901b8c4ce6c97e87a2dc73cfcc267a
What is the observed behavior of the code above?
Standard Output
Beginning test case: Content ends with a record.
Test case finished.
Beginning test case: Content ends with a newline.
Test case finished.
Beginning test case: Content ends with an #Comment then newline.
Test case finished.
Beginning test case: Content ends with an #Comment.
CSV error: record 2 (line: 5, byte: 70): found record with 1 fields, but the previous record has 3 fields
What is the expected or desired behavior of the code above?
Standard output should be:
Beginning test case: Content ends with a record.
Test case finished.
Beginning test case: Content ends with a newline.
Test case finished.
Beginning test case: Content ends with an #Comment then newline.
Test case finished.
Beginning test case: Content ends with an #Comment.
Test case finished.
The text was updated successfully, but these errors were encountered: