diff --git a/src/engine/mod.rs b/src/engine/mod.rs index e7f119a..399180a 100644 --- a/src/engine/mod.rs +++ b/src/engine/mod.rs @@ -201,8 +201,6 @@ impl Engine { ) -> Result { let start = Instant::now(); - println!("analyze deps"); - let query_response = self .query_crate .lock() diff --git a/src/interactors/crates.rs b/src/interactors/crates.rs index c97a527..ecd8cfc 100644 --- a/src/interactors/crates.rs +++ b/src/interactors/crates.rs @@ -103,9 +103,6 @@ where }; let uri = format!("{}/master/{}", CRATES_INDEX_BASE_URI, path); - - println!("analyze from uri {:?}", &uri); - let uri = uri.parse::().expect("TODO: MAP ERROR PROPERLY"); let request = Request::get(uri.clone()) @@ -133,7 +130,7 @@ where .lines() .map(|s| s.trim()) .filter(|s| !s.is_empty()) - .map(|s| serde_json::from_str::(s)) + .map(serde_json::from_str) .collect::>(), ) .err_into() diff --git a/src/interactors/mod.rs b/src/interactors/mod.rs index 65f5c23..efef47e 100644 --- a/src/interactors/mod.rs +++ b/src/interactors/mod.rs @@ -38,16 +38,16 @@ where fn call(&mut self, req: (RepoPath, RelativePathBuf)) -> Self::Future { let (repo_path, path) = req; let uri = match &repo_path.site { - &RepoSite::Github => github::get_manifest_uri(&repo_path, &path), - &RepoSite::Gitlab => gitlab::get_manifest_uri(&repo_path, &path), - &RepoSite::Bitbucket => bitbucket::get_manifest_uri(&repo_path, &path), + RepoSite::Github => github::get_manifest_uri(&repo_path, &path), + RepoSite::Gitlab => gitlab::get_manifest_uri(&repo_path, &path), + RepoSite::Bitbucket => bitbucket::get_manifest_uri(&repo_path, &path), }; - if let Err(error) = uri { - return Box::pin(err(error)); - } + let uri = match uri { + Ok(uri) => uri, + Err(error) => return Box::pin(err(error)), + }; - let uri = uri.unwrap(); let request = Request::get(uri.clone()) .header(USER_AGENT, "deps.rs") .body(Body::empty()) diff --git a/src/server/mod.rs b/src/server/mod.rs index e7443c3..c104f55 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -100,9 +100,7 @@ impl App { } } &Route::CrateStatus(format) => { - println!("route"); if *req.method() == Method::GET { - println!("get"); return self .crate_status(req, route_match.params, logger, format) .await; @@ -288,8 +286,6 @@ impl App { let crate_path_result = CratePath::from_parts(name, version); - println!("crate path {:?}", &crate_path_result); - match crate_path_result { Err(err) => { error!(logger, "error: {}", err); @@ -301,15 +297,11 @@ impl App { Ok(response) } Ok(crate_path) => { - println!("crate path ok"); - let analyze_result = server .engine .analyze_crate_dependencies(crate_path.clone()) .await; - println!("results analyzed {:?}", &analyze_result); - match analyze_result { Err(err) => { error!(logger, "error: {}", err); @@ -321,16 +313,12 @@ impl App { Ok(response) } Ok(analysis_outcome) => { - println!("analysis ok"); - let response = App::status_format_analysis( Some(analysis_outcome), format, SubjectPath::Crate(crate_path), ); - println!("response created"); - Ok(response) } }