Skip to content

Commit

Permalink
Rust: Fix 1.74 clippy issues (#6280)
Browse files Browse the repository at this point in the history
Fix clippy issues
  • Loading branch information
DavidSouther authored Apr 1, 2024
1 parent 5fad395 commit 6aadb9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async fn send_notification(
.key(destination.1)
.presigned(
PresigningConfig::builder()
.expires_in(Duration::days(1).to_std()?)
.expires_in(Duration::try_days(1).unwrap().to_std()?)
.build()?,
)
.await?;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use chrono::NaiveDateTime;
use chrono::DateTime;
use std::io::Read;
use streaming_zip::Archive;

Expand All @@ -14,7 +14,7 @@ async fn main() -> Result<(), anyhow::Error> {
let mut body = [0u8; READ_SIZE];
zip_writer.start_new_file(
"name".into(),
NaiveDateTime::from_timestamp_micros(0).unwrap(),
DateTime::from_timestamp_micros(0).unwrap().naive_utc(),
streaming_zip::CompressionMode::Deflate(8),
false,
)?;
Expand Down

0 comments on commit 6aadb9b

Please sign in to comment.