Fix cargo clippy issues
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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}"
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
@@ -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!");
|
||||
|
@@ -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!")
|
||||
}
|
||||
|
Reference in New Issue
Block a user