serde-this-or-that
serde-this-or-that copied to clipboard
Add unit (and doc) tests for `de_impl_opt.rs`
There seems to be some differing assumptions on what should be None and what shouldn't.
I find the examples section hard to read. Rather than having many examples, it may be better to have unit tests - and examples (doc tests) in src/de_impl_opt.rs doc strings.
Somewhere there should be a dense table/section where the behaviour can be seen at a glance - possibly in the doc string itself. I like the # Returns section, explaining behaviour, but this could be complemented with more comprehensive cases for each of the input types str, i64, f64, u64.
Originally posted by @corneliusroemer in https://github.com/rnag/serde-this-or-that/pull/5#pullrequestreview-1347066880
Actually I did add tests for this. So I'm closing it out.
Re-reading this issue description a bit more closely, and it seems adding unit tests in each module (though this was accomplished) is not enough to satisfy the ask. Re-opening this issue as a result.