tmontaigu / dbase-rs

Rust library to read & write dBase files.
MIT License
29 stars 30 forks source link

fix: parsing empty date string #1

Closed laibulle closed 5 years ago

laibulle commented 5 years ago

I have case where my file contains an empty date " ". In this file http://www.marineregions.org/downloads.php "World EEZ v10".

Also run fmt on files.

tmontaigu commented 5 years ago

Interesting,

Uninitialized values are not handled at all for now (which leads to the problem you had). So returning a Date{year: 0, month: 0, day: 0} should be fine.

Thanks for the PR

(on a side note, avoid running fmt in a PR, or do it in a separate commit as this hides the logical changes between the formatting changes in the diff)