add wasm-bindgen conversion impls to Datetime
This pull request adds the conversion impls for wasm-bindgen crate's traits to enable usage in structs annotated with #[wasm_bindgen]
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 90.90%. Comparing base (ebc808e) to head (9949fed).
:warning: Report is 9 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #1750 +/- ##
==========================================
- Coverage 90.90% 90.90% -0.01%
==========================================
Files 39 39
Lines 16254 16254
==========================================
- Hits 14776 14775 -1
- Misses 1478 1479 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Closes #1749
Per the recommendations on BurntSushi/jiff#424, I just want to alert the maintainers of chrono that the module these traits live in (wasm-bindgen::convert) is unstable and internal. Implementing these traits could pose semver compatibility issues.
(Please squash any changes from feedback into the original commit.)
@djc done! Thanks for the feedback. Again, I'd just like to alert you that the traits I've implemented are specifically marked as unstable, which poses semver issues. In practice, I'm not sure how much of an actual issue it will be, but I figured I'd reiterate in case you didn't see it last time.
Ah, sorry, I missed your last comment on that. I think I'm still willing to take this, although I want an extra opt-in Cargo feature (let's call it wasm-bindgen-unstable) and will basically ignore any breakage from this.
Sounds good to me! This will be incredibly useful for me so I'm happy this is going through.