bluemoon / calends

Calendar library for Rust
MIT License
6 stars 1 forks source link

Avoid chrono deprecation nags; one clippy ref-ref nag #31

Closed bobhy closed 1 year ago

bobhy commented 1 year ago

Sorry for the unsolicited PR, but the deprecation warnings were bugging me... Updated all flagged chrono builders with their _opt...unwrap() equivalents. chrono API is a bit tedious. Also changed one ref-to-a-ref nag in bound.rs.

Bonus, all tests still pass!

bluemoon commented 1 year ago

this looks good! I can bump the version number and ship this

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 88.04% and project coverage change: +0.67 :tada:

Comparison is base (39cdcc1) 73.78% compared to head (9f1a04a) 74.45%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #31 +/- ## ========================================== + Coverage 73.78% 74.45% +0.67% ========================================== Files 21 21 Lines 1503 1566 +63 ========================================== + Hits 1109 1166 +57 - Misses 394 400 +6 ``` | [Impacted Files](https://app.codecov.io/gh/bluemoon/calends/pull/31?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bradford+Toney) | Coverage Δ | | |---|---|---| | [src/lib.rs](https://app.codecov.io/gh/bluemoon/calends/pull/31?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bradford+Toney#diff-c3JjL2xpYi5ycw==) | `100.00% <ø> (ø)` | | | [src/util/search.rs](https://app.codecov.io/gh/bluemoon/calends/pull/31?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bradford+Toney#diff-c3JjL3V0aWwvc2VhcmNoLnJz) | `42.53% <29.62%> (-0.67%)` | :arrow_down: | | [src/unit/domain.rs](https://app.codecov.io/gh/bluemoon/calends/pull/31?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bradford+Toney#diff-c3JjL3VuaXQvZG9tYWluLnJz) | `70.31% <72.72%> (ø)` | | | [src/duration/relative.rs](https://app.codecov.io/gh/bluemoon/calends/pull/31?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bradford+Toney#diff-c3JjL2R1cmF0aW9uL3JlbGF0aXZlLnJz) | `95.06% <100.00%> (ø)` | | | [src/interval/base.rs](https://app.codecov.io/gh/bluemoon/calends/pull/31?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bradford+Toney#diff-c3JjL2ludGVydmFsL2Jhc2UucnM=) | `58.67% <100.00%> (+4.43%)` | :arrow_up: | | [src/interval/bound.rs](https://app.codecov.io/gh/bluemoon/calends/pull/31?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bradford+Toney#diff-c3JjL2ludGVydmFsL2JvdW5kLnJz) | `80.82% <100.00%> (ø)` | | | [src/interval/like.rs](https://app.codecov.io/gh/bluemoon/calends/pull/31?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bradford+Toney#diff-c3JjL2ludGVydmFsL2xpa2UucnM=) | `87.87% <100.00%> (ø)` | | | [src/interval/marker.rs](https://app.codecov.io/gh/bluemoon/calends/pull/31?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bradford+Toney#diff-c3JjL2ludGVydmFsL21hcmtlci5ycw==) | `88.00% <100.00%> (+1.04%)` | :arrow_up: | | [src/interval/parse.rs](https://app.codecov.io/gh/bluemoon/calends/pull/31?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bradford+Toney#diff-c3JjL2ludGVydmFsL3BhcnNlLnJz) | `66.66% <100.00%> (+5.55%)` | :arrow_up: | | [src/recurrence/recur.rs](https://app.codecov.io/gh/bluemoon/calends/pull/31?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bradford+Toney#diff-c3JjL3JlY3VycmVuY2UvcmVjdXIucnM=) | `84.54% <100.00%> (+5.02%)` | :arrow_up: | | ... and [2 more](https://app.codecov.io/gh/bluemoon/calends/pull/31?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Bradford+Toney) | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.