Fix cargo clippy issues
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-07-03 08:01:36 +02:00
parent 96747bda89
commit 1dd86807fd
8 changed files with 14 additions and 19 deletions

View File

@@ -34,8 +34,7 @@ pub async fn upload(MultipartForm(mut form): MultipartForm<UploadDiskImageForm>)
if let Some(mime_type) = file.content_type {
if !constants::ALLOWED_DISK_IMAGES_MIME_TYPES.contains(&mime_type.as_ref()) {
return Ok(HttpResponse::BadRequest().json(format!(
"Unsupported file type for disk upload: {}",
mime_type
"Unsupported file type for disk upload: {mime_type}"
)));
}
}

View File

@@ -52,7 +52,7 @@ pub async fn upload_file(MultipartForm(mut form): MultipartForm<UploadIsoForm>)
}
let dest_file = AppConfig::get().iso_storage_path().join(file_name);
log::info!("Will save ISO file {:?}", dest_file);
log::info!("Will save ISO file {dest_file:?}");
if dest_file.exists() {
log::error!("Conflict with uploaded iso file name!");

View File

@@ -43,7 +43,7 @@ impl actix_web::error::ResponseError for HttpErr {
}
}
fn error_response(&self) -> HttpResponse<BoxBody> {
log::error!("Error while processing request! {}", self);
log::error!("Error while processing request! {self}");
HttpResponse::InternalServerError().body("Failed to execute request!")
}