diff --git a/s3/src/bucket.rs b/s3/src/bucket.rs index bed16bf4b1..ac49f5218a 100644 --- a/s3/src/bucket.rs +++ b/s3/src/bucket.rs @@ -2876,7 +2876,7 @@ mod test { )] async fn test_tagging_aws() { let bucket = test_aws_bucket(); - let _target_tags = vec![ + let _target_tags = [ Tag { key: "Tag1".to_string(), value: "Value1".to_string(), @@ -2917,7 +2917,7 @@ mod test { )] async fn test_tagging_minio() { let bucket = test_minio_bucket(); - let _target_tags = vec![ + let _target_tags = [ Tag { key: "Tag1".to_string(), value: "Value1".to_string(), diff --git a/s3/src/command.rs b/s3/src/command.rs index ca0b2b10ea..4540b76c40 100644 --- a/s3/src/command.rs +++ b/s3/src/command.rs @@ -171,7 +171,7 @@ pub enum Command<'a> { }, } -impl<'a> Command<'a> { +impl Command<'_> { pub fn http_verb(&self) -> HttpMethod { match *self { Command::GetObject diff --git a/s3/src/request/tokio_backend.rs b/s3/src/request/tokio_backend.rs index ffe5813a1f..a66ff11380 100644 --- a/s3/src/request/tokio_backend.rs +++ b/s3/src/request/tokio_backend.rs @@ -68,7 +68,7 @@ pub struct ReqwestRequest<'a> { } #[maybe_async] -impl<'a> Request for ReqwestRequest<'a> { +impl Request for ReqwestRequest<'_> { type Response = reqwest::Response; type HeaderMap = reqwest::header::HeaderMap; diff --git a/s3/src/utils/time_utils.rs b/s3/src/utils/time_utils.rs index d677eaccdd..a6b0fa3823 100644 --- a/s3/src/utils/time_utils.rs +++ b/s3/src/utils/time_utils.rs @@ -16,6 +16,9 @@ pub fn now_utc() -> OffsetDateTime { OffsetDateTime::from_unix_timestamp(current_time().unwrap() as i64).unwrap() } +#[cfg(test)] +pub use mocked_time::*; + #[cfg(test)] mod mocked_time { use super::*; @@ -23,7 +26,7 @@ mod mocked_time { use std::cell::Cell; thread_local! { - static TIMESTAMP: Cell = Cell::new(0); + static TIMESTAMP: Cell = const { Cell::new(0) }; } pub fn current_time() -> Result { @@ -157,5 +160,3 @@ mod mocked_time { } } } -#[cfg(test)] -pub use mocked_time::*;