Private
Public Access
1
0

Fix clippy compilation errors: restore required imports, prefix unused variables

This commit is contained in:
2026-04-12 15:52:08 +00:00
parent 409f1a4517
commit f2c6d088c8
4 changed files with 14 additions and 10 deletions

View File

@ -205,7 +205,7 @@ pub async fn get_package(
_req: HttpRequest,
) -> impl Responder {
let request_id = Uuid::new_v4().to_string();
let timestamp = Utc::now().to_rfc3339();
let _timestamp = Utc::now().to_rfc3339();
let package_name = path.into_inner();
// VULN-001, VULN-003: Validate package name (length and empty string)
@ -252,7 +252,7 @@ pub async fn install_packages(
_req: HttpRequest,
) -> impl Responder {
let request_id = Uuid::new_v4().to_string();
let timestamp = Utc::now().to_rfc3339();
let _timestamp = Utc::now().to_rfc3339();
let package_names: Vec<String> = body.packages.iter().map(|p| p.name.clone()).collect();
// VULN-001, VULN-003: Validate all package names (length and empty string)
@ -337,7 +337,7 @@ pub async fn update_package(
_req: HttpRequest,
) -> impl Responder {
let request_id = Uuid::new_v4().to_string();
let timestamp = Utc::now().to_rfc3339();
let _timestamp = Utc::now().to_rfc3339();
let package_name = path.into_inner();
// VULN-001, VULN-003: Validate package name (length and empty string)
@ -421,7 +421,7 @@ pub async fn remove_package(
_req: HttpRequest,
) -> impl Responder {
let request_id = Uuid::new_v4().to_string();
let timestamp = Utc::now().to_rfc3339();
let _timestamp = Utc::now().to_rfc3339();
let package_name = path.into_inner();
// VULN-001, VULN-003: Validate package name (length and empty string)