diff --git a/src/engine/mod.rs b/src/engine/mod.rs index e7e1728..103451c 100644 --- a/src/engine/mod.rs +++ b/src/engine/mod.rs @@ -32,8 +32,6 @@ use self::fut::{analyze_dependencies, crawl_manifest}; #[derive(Clone, Debug)] pub struct Engine { - client: reqwest::Client, - logger: Logger, metrics: Arc, query_crate: Cache, get_popular_crates: Cache, @@ -66,15 +64,13 @@ impl Engine { ); let retrieve_file_at_path = RetrieveFileAtPath::new(client.clone()); let fetch_advisory_db = Cache::new( - FetchAdvisoryDatabase::new(client.clone()), + FetchAdvisoryDatabase::new(client), Duration::from_secs(1800), 1, - logger.clone(), + logger, ); Engine { - client, - logger, metrics, query_crate, get_popular_crates, diff --git a/src/interactors/crates.rs b/src/interactors/crates.rs index da881c8..c13fd88 100644 --- a/src/interactors/crates.rs +++ b/src/interactors/crates.rs @@ -15,25 +15,6 @@ use crate::{ const CRATES_API_BASE_URI: &str = "https://crates.io/api/v1"; -#[derive(Deserialize, Debug)] -struct RegistryPackageDep { - name: String, - req: VersionReq, - #[serde(default)] - kind: Option, - #[serde(default)] - package: Option, -} - -#[derive(Deserialize, Debug)] -struct RegistryPackage { - vers: Version, - #[serde(default)] - deps: Vec, - #[serde(default)] - yanked: bool, -} - fn convert_pkgs(krate: Crate) -> Result { let name: CrateName = krate.name().parse()?;