mirror of
https://github.com/deps-rs/deps.rs.git
synced 2024-11-22 02:16:30 +00:00
remove debugging print
This commit is contained in:
parent
b7b25b7cb7
commit
4642560868
4 changed files with 8 additions and 25 deletions
|
@ -201,8 +201,6 @@ impl Engine {
|
|||
) -> Result<AnalyzeDependenciesOutcome, Error> {
|
||||
let start = Instant::now();
|
||||
|
||||
println!("analyze deps");
|
||||
|
||||
let query_response = self
|
||||
.query_crate
|
||||
.lock()
|
||||
|
|
|
@ -103,9 +103,6 @@ where
|
|||
};
|
||||
|
||||
let uri = format!("{}/master/{}", CRATES_INDEX_BASE_URI, path);
|
||||
|
||||
println!("analyze from uri {:?}", &uri);
|
||||
|
||||
let uri = uri.parse::<Uri>().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::<RegistryPackage>(s))
|
||||
.map(serde_json::from_str)
|
||||
.collect::<Result<_, _>>(),
|
||||
)
|
||||
.err_into()
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue