chronotope / chrono

Date and time library for Rust
Other
3.3k stars 523 forks source link

0.5: Revise exposed crate features #1552

Closed pitdicker closed 6 months ago

pitdicker commented 6 months ago

Remove the old crate features libc, old_time, rkyv and winapi. Switch to the dep: syntax for optional dependencies that where exposed as features: pure-rust-locales, android-tzdata, iana-time-zone, js-sys, wasm-bindgen and windows-targets.

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.99%. Comparing base (58ae538) to head (87f8b43). Report is 1 commits behind head on 0.5.x.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## 0.5.x #1552 +/- ## ======================================= Coverage 93.99% 93.99% ======================================= Files 37 37 Lines 16536 16543 +7 ======================================= + Hits 15543 15550 +7 Misses 993 993 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pitdicker commented 6 months ago

Also updated the description in lib.rs and the readme, and removed the __unstable_bench feature.

The bench feature was only used for benchmarking YearFlags::from_year. All that method does is:

let year = year.rem_euclid(400);
YEAR_TO_FLAGS[year as usize]

A division and a table lookup doesn't seem all that interesting to benchmark, let alone have a feature for.

djc commented 6 months ago

Much better, I think that split was definitely worth it!

pitdicker commented 6 months ago

Sorry that this is taking so many back-and-fort between us. But I'm really starting to like the changes here as good cleanups.