BurntSushi / BurntSushi/rust-csv

No error, when there are no items in CSV file during struct deserializing (with serde)

Open
#272 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2k
Forks
257
PR merge metrics
No merged PRs in 30d

Description

### Problem:
When deserializing a CSV file with only headers without any other rows into a struct (with serde), It doesn't give any error, and the records count is 0.

In this case, it may give an error, and can be stated that there must be at least one item in the csv file

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing deserialization of a headers-only CSV file into a struct with serde, then trace the record-count and deserialization path in the repository. Confirm the intended behavior with the existing API and tests; done means the empty input produces an error if that requirement is accepted, with coverage for the headers-only case.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.