diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-05-20 11:54:09 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2021-05-20 11:55:05 +0200 |
commit | 9b51bbb5aac1f5dc27d6666f724f3f74be1c13e8 (patch) | |
tree | b8b41965a4f706f4eccda4477606f7f033921d4f /src/commands | |
parent | 9bec3af8a0a0a53722a6a0fd77a805131707416a (diff) |
Update dependency: indicatif 0.15 -> 0.16.1
0.16.1 has been published which fixes the bug introduced by 0.16.0, hence update
this dependency.
This reverts commit ddbd9629b3188c9f08d023829683c40ab9e1448b.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/endpoint.rs | 6 | ||||
-rw-r--r-- | src/commands/source.rs | 14 | ||||
-rw-r--r-- | src/commands/util.rs | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/commands/endpoint.rs b/src/commands/endpoint.rs index e69dc56..4de51d2 100644 --- a/src/commands/endpoint.rs +++ b/src/commands/endpoint.rs @@ -75,7 +75,7 @@ async fn ping(endpoint_names: Vec<EndpointName>, .map(|endpoint| { let bar = multibar.add(progress_generator.bar()); bar.set_length(n_pings); - bar.set_message(&format!("Pinging {}", endpoint.name())); + bar.set_message(format!("Pinging {}", endpoint.name())); async move { for i in 1..(n_pings + 1) { @@ -83,14 +83,14 @@ async fn ping(endpoint_names: Vec<EndpointName>, let r = endpoint.ping().await; bar.inc(1); if let Err(e) = r { - bar.finish_with_message(&format!("Pinging {} failed", endpoint.name())); + bar.finish_with_message(format!("Pinging {} failed", endpoint.name())); return Err(e) } tokio::time::sleep(tokio::time::Duration::from_secs(sleep)).await; } - bar.finish_with_message(&format!("Pinging {} successful", endpoint.name())); + bar.finish_with_message(format!("Pinging {} successful", endpoint.name())); Ok(()) } }) diff --git a/src/commands/source.rs b/src/commands/source.rs index 2e4ee2b..cd33921 100644 --- a/src/commands/source.rs +++ b/src/commands/source.rs @@ -245,7 +245,7 @@ pub async fn download( .map(|p| { sc.sources_for(p).into_iter().map(|source| { let bar = multi.add(progressbars.spinner()); - bar.set_message(&format!("Downloading {}", source.url())); + bar.set_message(format!("Downloading {}", source.url())); async move { let source_path_exists = source.path().exists(); if !source_path_exists && source.download_manually() { @@ -273,7 +273,7 @@ pub async fn download( let response = match reqwest::get(source.url().as_ref()).await { Ok(resp) => resp, Err(e) => { - bar.finish_with_message(&format!("Failed: {}", source.url())); + bar.finish_with_message(format!("Failed: {}", source.url())); return Err(e).with_context(|| anyhow!("Downloading '{}'", source.url())) } }; @@ -291,9 +291,9 @@ pub async fn download( bar.inc(bytes.len() as u64); if let Some(len) = response.content_length() { - bar.set_message(&format!("Downloading {} ({}/{} bytes)", source.url(), bytes_written, len)); + bar.set_message(format!("Downloading {} ({}/{} bytes)", source.url(), bytes_written, len)); } else { - bar.set_message(&format!("Downloading {} ({} bytes)", source.url(), bytes_written)); + bar.set_message(format!("Downloading {} ({} bytes)", source.url(), bytes_written)); } } @@ -305,17 +305,17 @@ pub async fn download( if source_path_exists /* && force is implied by 'if' above*/ { if let Err(e) = source.remove_file().await { - bar.finish_with_message(&format!("Failed to remove existing file: {}", source.path().display())); + bar.finish_with_message(format!("Failed to remove existing file: {}", source.path().display())); return Err(e) } } if let Err(e) = perform_download(&source, &bar).await { - bar.finish_with_message(&format!("Failed: {}", source.url())); + bar.finish_with_message(format!("Failed: {}", source.url())); Err(e) } else { - bar.finish_with_message(&format!("Finished: {}", source.url())); + bar.finish_with_message(format!("Finished: {}", source.url())); Ok(()) } } diff --git a/src/commands/util.rs b/src/commands/util.rs index 95efda2..e892875 100644 --- a/src/commands/util.rs +++ b/src/commands/util.rs @@ -108,7 +108,7 @@ where bar.finish_with_message("Linting errored"); return Err(anyhow!("Linting was not successful")); } else { - bar.finish_with_message(&format!( + bar.finish_with_message(format!( "Finished linting {} package scripts", lint_results.len() )); |