From a9e323460d20fd1374651682d9693d18476e4730 Mon Sep 17 00:00:00 2001 From: Helio Frota <00hf11@gmail.com> Date: Wed, 13 Mar 2024 14:31:14 -0300 Subject: [PATCH] chore: removes remaining unused imports --- common/src/cpe22.rs | 3 +-- common/src/package/mod.rs | 2 -- server/src/lib.rs | 7 ++----- server/src/server/read/package.rs | 1 - server/src/server/read/vulnerability.rs | 2 +- 5 files changed, 4 insertions(+), 11 deletions(-) diff --git a/common/src/cpe22.rs b/common/src/cpe22.rs index 2842d2b4a..0c1a4ffb8 100644 --- a/common/src/cpe22.rs +++ b/common/src/cpe22.rs @@ -1,7 +1,6 @@ -use cpe::component::OwnedComponent; use cpe::cpe::{Cpe, CpeType}; use cpe::uri::{OwnedUri, Uri}; -use std::fmt::{Debug, Display, Formatter}; +use std::fmt::{Debug, Formatter}; #[derive(Clone)] pub struct Cpe22 { diff --git a/common/src/package/mod.rs b/common/src/package/mod.rs index f22a6be28..d72163ab7 100644 --- a/common/src/package/mod.rs +++ b/common/src/package/mod.rs @@ -1,7 +1,5 @@ use serde::{Deserialize, Serialize}; -use crate::purl::Purl; - #[derive(Serialize, Deserialize, Clone, Debug, Default)] pub struct PackageVulnerabilityAssertions { pub assertions: Vec, diff --git a/server/src/lib.rs b/server/src/lib.rs index 050ad7e1f..ed2edaa25 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -1,9 +1,6 @@ #![allow(unused)] - use crate::server::read; -use crate::server::Error::System; -use actix_web::middleware::Logger; -use actix_web::{web, App, HttpServer}; +use actix_web::web; use std::process::ExitCode; use std::sync::Arc; use std::time::Duration; @@ -14,7 +11,7 @@ use trustify_auth::authorizer::Authorizer; use trustify_common::config::Database; use trustify_infrastructure::app::http::{HttpServerBuilder, HttpServerConfig}; use trustify_infrastructure::endpoint::Huevos; -use trustify_infrastructure::health::checks::{Local, Probe}; +use trustify_infrastructure::health::checks::Local; use trustify_infrastructure::{Infrastructure, InfrastructureConfig}; pub mod server; diff --git a/server/src/server/read/package.rs b/server/src/server/read/package.rs index a9746b1da..1911530db 100644 --- a/server/src/server/read/package.rs +++ b/server/src/server/read/package.rs @@ -1,7 +1,6 @@ use actix_web::{get, web, HttpResponse, Responder}; use serde::{Deserialize, Serialize}; use std::str::FromStr; -use trustify_api::db::Transactional; use trustify_common::purl::Purl; diff --git a/server/src/server/read/vulnerability.rs b/server/src/server/read/vulnerability.rs index cb8c6a83c..26712f3bf 100644 --- a/server/src/server/read/vulnerability.rs +++ b/server/src/server/read/vulnerability.rs @@ -1,5 +1,5 @@ use crate::AppState; -use actix_web::{get, post, web, HttpResponse, Responder}; +use actix_web::{get, web, HttpResponse, Responder}; #[utoipa::path( responses(