mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
Send telemetry report to quickinstall if no pre-built is found (#1905)
* Send telemetry report to quickinstall if no pre-built is found quickinstall telemtry is overloaded cargo-bins/cargo-quickinstall#268, it only needs report when the pre-built is not available in upstream. Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix resolve.rs And optimize sending telemtry: Remove unnecessary `<Arc as Clone>::clone` Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix fmt of resolve.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --------- Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
parent
e4bbbff1fd
commit
a53d51c083
1 changed files with 8 additions and 8 deletions
|
@ -175,13 +175,7 @@ async fn resolve_inner(
|
|||
);
|
||||
}
|
||||
|
||||
if !opts.disable_telemetry {
|
||||
for fetcher in &handles {
|
||||
fetcher.clone().report_to_upstream();
|
||||
}
|
||||
}
|
||||
|
||||
for fetcher in handles {
|
||||
for fetcher in &handles {
|
||||
match timeout(
|
||||
opts.maximum_resolution_timeout,
|
||||
AutoAbortJoinHandle::new(fetcher.clone().find()).flattened_join(),
|
||||
|
@ -210,7 +204,7 @@ async fn resolve_inner(
|
|||
Ok(bin_files) => {
|
||||
if !bin_files.is_empty() {
|
||||
return Ok(Resolution::Fetch(Box::new(ResolutionFetch {
|
||||
fetcher,
|
||||
fetcher: fetcher.clone(),
|
||||
new_version: package_info.version,
|
||||
name: package_info.name,
|
||||
version_req: version_req_str,
|
||||
|
@ -256,6 +250,12 @@ async fn resolve_inner(
|
|||
}
|
||||
}
|
||||
|
||||
if !opts.disable_telemetry {
|
||||
for fetcher in handles {
|
||||
fetcher.report_to_upstream();
|
||||
}
|
||||
}
|
||||
|
||||
if !opts.cargo_install_fallback {
|
||||
return Err(BinstallError::NoFallbackToCargoInstall);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue