-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export as_opt_<type>
helper functions
#5
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
.
…())` rather than `None`
Co-authored-by: Cornelius Roemer <[email protected]>
…ool)`, and others to `None`
Hi @corneliusroemer ! Thanks for bringing this up. I totally agree, that at some point it would be worth it to refactor it to move example cases into doc tests & unit tests more explicitly, that way it also runs automatically in the GitHub Actions workflow (CI) and also when deploying new versions. I've created a new issue to track effort on this separately, as part of #7 . For now, as and when when time allows, please take a look at recent changes and commits I have added as part of this PR, to confirm if it resolves or addresses all issues based on your notes. I will hold off on merging the changes until then. Thanks, and have a great Monday 🎉 ! |
I just stumbled upon this crate and the first thing I wanted was |
@josephwynn-sc Yes, totally! Sorry for the long wait, just coming back after a hiatus. I'll look into it this weekend, run some tests with |
@corneliusroemer @josephwynn-sc Done -- PR has been merged, and exported Feel free to check it out and let me know! 😃 |
Closes #4