mirror of
https://github.com/deps-rs/deps.rs.git
synced 2024-11-22 02:16:30 +00:00
Fix dead code warnings (#130)
This commit is contained in:
parent
9b7d2786d6
commit
5705c7c785
2 changed files with 2 additions and 25 deletions
|
@ -32,8 +32,6 @@ use self::fut::{analyze_dependencies, crawl_manifest};
|
|||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Engine {
|
||||
client: reqwest::Client,
|
||||
logger: Logger,
|
||||
metrics: Arc<StatsdClient>,
|
||||
query_crate: Cache<QueryCrate, CrateName>,
|
||||
get_popular_crates: Cache<GetPopularCrates, ()>,
|
||||
|
@ -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,
|
||||
|
|
|
@ -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<String>,
|
||||
#[serde(default)]
|
||||
package: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
struct RegistryPackage {
|
||||
vers: Version,
|
||||
#[serde(default)]
|
||||
deps: Vec<RegistryPackageDep>,
|
||||
#[serde(default)]
|
||||
yanked: bool,
|
||||
}
|
||||
|
||||
fn convert_pkgs(krate: Crate) -> Result<QueryCrateResponse, Error> {
|
||||
let name: CrateName = krate.name().parse()?;
|
||||
|
||||
|
|
Loading…
Reference in a new issue