From d4299b3ac2e7c28bc1bb92b062927a5e48655d93 Mon Sep 17 00:00:00 2001 From: Jim Crossley Date: Wed, 21 Feb 2024 12:07:54 -0500 Subject: [PATCH] clean up dead code Signed-off-by: Jim Crossley --- vexination/walker/src/lib.rs | 15 +++------------ vexination/walker/src/server.rs | 14 +++----------- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/vexination/walker/src/lib.rs b/vexination/walker/src/lib.rs index 580d4dee1..9df178e86 100644 --- a/vexination/walker/src/lib.rs +++ b/vexination/walker/src/lib.rs @@ -1,14 +1,5 @@ -#![allow(dead_code)] -#![allow(unused_variables)] -#![allow(unused_imports)] -use std::{ - path::PathBuf, - process::ExitCode, - str::FromStr, - time::{Duration, SystemTime}, -}; - -use prometheus::Registry; +use std::{path::PathBuf, process::ExitCode, time::SystemTime}; + use time::{Date, Month, UtcOffset}; use trustification_auth::client::OpenIdTokenProviderConfigArguments; use trustification_infrastructure::{Infrastructure, InfrastructureConfig}; @@ -81,7 +72,7 @@ impl Run { .run( "vexination-walker", |_context| async { Ok(()) }, - |context| async move { + |_context| async move { let provider = self.oidc.clone().into_provider_or_devmode(self.devmode).await?; let validation_date: Option = match (self.policy_date, self.v3_signatures) { diff --git a/vexination/walker/src/server.rs b/vexination/walker/src/server.rs index 6a820f7c3..641816b27 100644 --- a/vexination/walker/src/server.rs +++ b/vexination/walker/src/server.rs @@ -1,8 +1,8 @@ use std::collections::BTreeMap; use std::path::PathBuf; use std::sync::atomic::{AtomicUsize, Ordering}; +use std::sync::Arc; use std::time::SystemTime; -use std::{net::SocketAddr, sync::Arc, time::Duration}; use csaf_walker::discover::AsDiscovered; use csaf_walker::model::metadata::Distribution; @@ -10,8 +10,7 @@ use csaf_walker::report::{render_to_html, DocumentKey, Duplicates, ReportRenderO use csaf_walker::visitors::duplicates::DetectDuplicatesVisitor; use csaf_walker::visitors::filter::{FilterConfig, FilteringVisitor}; use csaf_walker::{ - discover::DiscoveredAdvisory, - retrieve::{RetrievedAdvisory, RetrievingVisitor}, + retrieve::RetrievingVisitor, source::{FileSource, HttpSource}, validation::{ValidatedAdvisory, ValidationError, ValidationVisitor}, verification::{ @@ -21,16 +20,9 @@ use csaf_walker::{ walker::Walker, }; use reqwest::{header, StatusCode}; -use serde::Deserialize; -use tokio::sync::{Mutex, RwLock}; use trustification_auth::client::{TokenInjector, TokenProvider}; use url::Url; -use walker_common::{ - fetcher::{Fetcher, FetcherOptions}, - since::Since, - utils::url::Urlify, - validate::ValidationOptions, -}; +use walker_common::{fetcher::Fetcher, since::Since, utils::url::Urlify, validate::ValidationOptions}; #[allow(clippy::too_many_arguments)] pub async fn run(