forked from BurntSushi/rust-csv
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid running into infinite loops when recovering from Reader errors
Resolves BurntSushi#207 When reading and parsing a record fails, it's correct behaviour in most cases to keep on trying to read and parse the next record. However when the Error is caused by failing to read from the underlying `impl Read`, the next read would almost always fail with the exact same error. In that scenario, reading from the underlying `impl Read` should not be attempted when trying to deserialize the next record, as this may lead to infinite loops. Instead, the `Reader` will behave in the same way as if an end-of-file had been reached.
- Loading branch information
Showing
1 changed file
with
39 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters