From 25609626847663424313dcef5e081713e2baadbe Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Thu, 3 Jul 2025 08:38:56 +0200 Subject: [PATCH] Fix cargo clippy issues --- moneymgr_backend/src/connections/s3_connection.rs | 2 +- moneymgr_backend/src/extractors/account_extractor.rs | 2 +- moneymgr_backend/src/extractors/auth_extractor.rs | 4 ++-- moneymgr_backend/src/extractors/file_id_extractor.rs | 2 +- moneymgr_backend/src/extractors/inbox_entry_extractor.rs | 2 +- moneymgr_backend/src/extractors/movement_extractor.rs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/moneymgr_backend/src/connections/s3_connection.rs b/moneymgr_backend/src/connections/s3_connection.rs index 6ee516d..358132b 100644 --- a/moneymgr_backend/src/connections/s3_connection.rs +++ b/moneymgr_backend/src/connections/s3_connection.rs @@ -30,7 +30,7 @@ pub async fn create_bucket_if_required() -> anyhow::Result<()> { log::warn!("The bucket does not seem to exists, trying to create it!") } Err(e) => { - log::error!("Got unexpected error when querying bucket info: {}", e); + log::error!("Got unexpected error when querying bucket info: {e}"); return Err(BucketServiceError::FailedFetchBucketInfo.into()); } } diff --git a/moneymgr_backend/src/extractors/account_extractor.rs b/moneymgr_backend/src/extractors/account_extractor.rs index 3cc4575..90ab25c 100644 --- a/moneymgr_backend/src/extractors/account_extractor.rs +++ b/moneymgr_backend/src/extractors/account_extractor.rs @@ -50,7 +50,7 @@ impl FromRequest for AccountInPath { Self::load_account_from_path(&auth, account_id) .await .map_err(|e| { - log::error!("Failed to extract account ID from URL! {}", e); + log::error!("Failed to extract account ID from URL! {e}"); actix_web::error::ErrorNotFound("Could not fetch account information!") }) }) diff --git a/moneymgr_backend/src/extractors/auth_extractor.rs b/moneymgr_backend/src/extractors/auth_extractor.rs index 7470d61..c06acbf 100644 --- a/moneymgr_backend/src/extractors/auth_extractor.rs +++ b/moneymgr_backend/src/extractors/auth_extractor.rs @@ -165,13 +165,13 @@ impl FromRequest for AuthExtractor { // Update last use (if needed) if token.shall_update_time_used() { if let Err(e) = tokens_service::update_time_used(&token).await { - log::error!("Failed to refresh last usage of token! {}", e); + log::error!("Failed to refresh last usage of token! {e}"); } } // Handle tokens expiration if token.is_expired() { - log::error!("Attempted to use expired token! {:?}", token); + log::error!("Attempted to use expired token! {token:?}"); return Err(actix_web::error::ErrorBadRequest("Token has expired!")); } diff --git a/moneymgr_backend/src/extractors/file_id_extractor.rs b/moneymgr_backend/src/extractors/file_id_extractor.rs index 6ca161e..f64c35f 100644 --- a/moneymgr_backend/src/extractors/file_id_extractor.rs +++ b/moneymgr_backend/src/extractors/file_id_extractor.rs @@ -47,7 +47,7 @@ impl FromRequest for FileIdExtractor { Self::load_file_from_path(&auth, file_id) .await .map_err(|e| { - log::error!("Failed to extract file ID from URL! {}", e); + log::error!("Failed to extract file ID from URL! {e}"); actix_web::error::ErrorNotFound("Could not fetch file information!") }) }) diff --git a/moneymgr_backend/src/extractors/inbox_entry_extractor.rs b/moneymgr_backend/src/extractors/inbox_entry_extractor.rs index 2a48fa4..c8685ba 100644 --- a/moneymgr_backend/src/extractors/inbox_entry_extractor.rs +++ b/moneymgr_backend/src/extractors/inbox_entry_extractor.rs @@ -50,7 +50,7 @@ impl FromRequest for InboxEntryInPath { Self::load_inbox_entry_from_path(&auth, entry_id) .await .map_err(|e| { - log::error!("Failed to extract inbox entry ID from URL! {}", e); + log::error!("Failed to extract inbox entry ID from URL! {e}"); actix_web::error::ErrorNotFound("Could not fetch inbox entry information!") }) }) diff --git a/moneymgr_backend/src/extractors/movement_extractor.rs b/moneymgr_backend/src/extractors/movement_extractor.rs index c2decab..fa38be8 100644 --- a/moneymgr_backend/src/extractors/movement_extractor.rs +++ b/moneymgr_backend/src/extractors/movement_extractor.rs @@ -57,7 +57,7 @@ impl FromRequest for MovementInPath { Self::load_movement_from_path(&auth, account_id) .await .map_err(|e| { - log::error!("Failed to extract movement ID from URL! {}", e); + log::error!("Failed to extract movement ID from URL! {e}"); actix_web::error::ErrorNotFound("Could not fetch movement information!") }) })