Skip to content
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

build(deps): Bump chrono from 0.4.26 to 0.4.30 and remove use of deprecated function #1917

Merged
merged 2 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 6 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 14 additions & 25 deletions collector/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#![cfg_attr(docsrs, feature(doc_cfg))]

use backoff::{backoff::Backoff, ExponentialBackoff};
use chrono::{DateTime, Duration, Utc};
use chrono::{DateTime, Duration, TimeZone, Utc};
use derivative::Derivative;
use http_api_problem::HttpApiProblem;
pub use janus_core::task::AuthenticationToken;
Expand Down Expand Up @@ -545,10 +545,7 @@ impl<V: vdaf::Collector> Collector<V> {
partial_batch_selector: collect_response.partial_batch_selector().clone(),
report_count: collect_response.report_count(),
interval: (
DateTime::<Utc>::from_utc(
collect_response.interval().start().as_naive_date_time()?,
Utc,
),
Utc.from_utc_datetime(&collect_response.interval().start().as_naive_date_time()?),
collect_response
.interval()
.duration()
Expand Down Expand Up @@ -635,7 +632,7 @@ mod tests {
PollResult,
};
use assert_matches::assert_matches;
use chrono::{DateTime, NaiveDateTime, TimeZone, Utc};
use chrono::{NaiveDateTime, TimeZone, Utc};
#[cfg(feature = "fpvec_bounded_l2")]
use fixed_macro::fixed;
use janus_core::{
Expand Down Expand Up @@ -870,9 +867,8 @@ mod tests {
PartialBatchSelector::new_time_interval(),
1,
(
DateTime::<Utc>::from_utc(
NaiveDateTime::from_timestamp_opt(1_000_000, 0).unwrap(),
Utc
Utc.from_utc_datetime(
&NaiveDateTime::from_timestamp_opt(1_000_000, 0).unwrap(),
),
chrono::Duration::seconds(3600),
),
Expand Down Expand Up @@ -943,9 +939,8 @@ mod tests {
PartialBatchSelector::new_time_interval(),
1,
(
DateTime::<Utc>::from_utc(
NaiveDateTime::from_timestamp_opt(1_000_000, 0).unwrap(),
Utc
Utc.from_utc_datetime(
&NaiveDateTime::from_timestamp_opt(1_000_000, 0).unwrap(),
),
chrono::Duration::seconds(3600),
),
Expand Down Expand Up @@ -1015,9 +1010,8 @@ mod tests {
PartialBatchSelector::new_time_interval(),
1,
(
DateTime::<Utc>::from_utc(
NaiveDateTime::from_timestamp_opt(1_000_000, 0).unwrap(),
Utc
Utc.from_utc_datetime(
&NaiveDateTime::from_timestamp_opt(1_000_000, 0).unwrap(),
),
chrono::Duration::seconds(3600),
),
Expand Down Expand Up @@ -1096,9 +1090,8 @@ mod tests {
PartialBatchSelector::new_time_interval(),
1,
(
DateTime::<Utc>::from_utc(
NaiveDateTime::from_timestamp_opt(1_000_000, 0).unwrap(),
Utc
Utc.from_utc_datetime(
&NaiveDateTime::from_timestamp_opt(1_000_000, 0).unwrap(),
),
chrono::Duration::seconds(3600),
),
Expand Down Expand Up @@ -1170,10 +1163,7 @@ mod tests {
PartialBatchSelector::new_fixed_size(batch_id),
1,
(
DateTime::<Utc>::from_utc(
NaiveDateTime::from_timestamp_opt(0, 0).unwrap(),
Utc
),
Utc.from_utc_datetime(&NaiveDateTime::from_timestamp_opt(0, 0).unwrap()),
chrono::Duration::seconds(1),
),
1
Expand Down Expand Up @@ -1255,9 +1245,8 @@ mod tests {
PartialBatchSelector::new_time_interval(),
1,
(
DateTime::<Utc>::from_utc(
NaiveDateTime::from_timestamp_opt(1_000_000, 0).unwrap(),
Utc
Utc.from_utc_datetime(
&NaiveDateTime::from_timestamp_opt(1_000_000, 0).unwrap(),
),
chrono::Duration::seconds(3600),
),
Expand Down
Loading