Skip to content

Fix CRLF line positions after reading records - #433

Open
onuracar-dev wants to merge 1 commit into
BurntSushi:masterfrom
onuracar-dev:fix/395-crlf-position-line
Open

Fix CRLF line positions after reading records#433
onuracar-dev wants to merge 1 commit into
BurntSushi:masterfrom
onuracar-dev:fix/395-crlf-position-line

Conversation

@onuracar-dev

Copy link
Copy Markdown

Summary

  • consume the LF portion of a CRLF terminator before returning a completed record
  • preserve the record boundary when CRLF is split across input buffers
  • keep reader and record line positions aligned with the next record

Testing

  • cargo test --workspace
  • cargo build --workspace
  • cargo doc --workspace --no-deps
  • cargo fmt --all -- --check
  • cargo clippy -p csv-core -p csv --lib --tests --examples --bins -- -A clippy::upper_case_acronyms -A clippy::derivable_impls -A clippy::new_without_default -A clippy::wildcard_in_or_patterns -A clippy::result_large_err -A clippy::approx_constant -D warnings

AI assistance disclosure: I used OpenAI Codex to help analyze the parser state machine, implement the change, and run and review the tests. I reviewed the complete diff and validation results.

Fixes #395

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Position::line reports incorrect line when input has CRLF line endings

1 participant