Closed NaviHX closed 1 month ago
It looks like you are using some deprecated functions:
error: use of deprecated method `chrono::DateTime::<Tz>::date`: Use `date_naive()` instead
--> src/find/matchers/time.rs:28:41
|
28 | let local_midnight = local_time.date().and_hms(0, 0, 0);
| ^^^^
|
= note: `-D deprecated` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(deprecated)]`
error: use of deprecated method `chrono::Date::<Tz>::and_hms`: Use and_hms_opt() instead
--> src/find/matchers/time.rs:28:48
|
28 | let local_midnight = local_time.date().and_hms(0, 0, 0);
|
It looks like you are using some deprecated functions:
error: use of deprecated method `chrono::DateTime::<Tz>::date`: Use `date_naive()` instead --> src/find/matchers/time.rs:28:41 | 28 | let local_midnight = local_time.date().and_hms(0, 0, 0); | ^^^^ | = note: `-D deprecated` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(deprecated)]` error: use of deprecated method `chrono::Date::<Tz>::and_hms`: Use and_hms_opt() instead --> src/find/matchers/time.rs:28:48 | 28 | let local_midnight = local_time.date().and_hms(0, 0, 0); |
I removed the use of DateTime::date
and Date::and_hms
.
- it will need tests to make sure we don't regress :)
I added a test find::matchers::time::tests::get_local_midnight
.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Additional details and impacted files
```diff @@ Coverage Diff @@ ## main #467 +/- ## ========================================== + Coverage 66.50% 66.59% +0.09% ========================================== Files 36 36 Lines 4436 4439 +3 Branches 991 978 -13 ========================================== + Hits 2950 2956 +6 - Misses 1062 1064 +2 + Partials 424 419 -5 ```:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.