Skip to content

Commit

Permalink
Merge pull request rust-lang#157 from passcod/clap3
Browse files Browse the repository at this point in the history
  • Loading branch information
passcod committed Jun 8, 2022
2 parents 6877a0c + 0b5d3ec commit adfc260
Show file tree
Hide file tree
Showing 5 changed files with 205 additions and 131 deletions.
92 changes: 52 additions & 40 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -22,6 +22,7 @@ pkg-fmt = "zip"
async-trait = "0.1.56"
cargo_metadata = "0.14.2"
cargo_toml = "0.11.4"
clap = { version = "3.1.18", features = ["derive"] }
crates_io_api = { version = "0.8.0", default-features = false, features = ["rustls"] }
dirs = "4.0.0"
flate2 = { version = "1.0.24", features = ["zlib-ng"], default-features = false }
Expand All @@ -31,7 +32,6 @@ reqwest = { version = "0.11.10", features = [ "rustls-tls" ], default-features =
semver = "1.0.7"
serde = { version = "1.0.136", features = [ "derive" ] }
simplelog = "0.12.0"
structopt = "0.3.26"
strum = "0.24.0"
strum_macros = "0.24.0"
tar = "0.4.38"
Expand Down
10 changes: 8 additions & 2 deletions src/fetchers/quickinstall.rs
@@ -1,7 +1,7 @@
use std::path::Path;
use std::sync::Arc;

use log::info;
use log::{debug, info};
use reqwest::Method;
use url::Url;

Expand Down Expand Up @@ -77,8 +77,14 @@ impl QuickInstall {
}

pub async fn report(&self) -> Result<(), BinstallError> {
info!("Sending installation report to quickinstall (anonymous)");
if cfg!(debug_assertions) {
debug!("Not sending quickinstall report in debug mode");
return Ok(());
}

let url = Url::parse(&self.stats_url())?;
debug!("Sending installation report to quickinstall ({url})");

reqwest::Client::builder()
.user_agent(USER_AGENT)
.build()?
Expand Down

0 comments on commit adfc260

Please sign in to comment.