Skip to content

Commit 406e183

Browse files
committed
chang 1 tries to 1 try
1 parent 662213b commit 406e183

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/cargo/util/network/retry.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,11 @@ impl<'a> Retry<'a> {
108108
.downcast_ref::<HttpNotSuccessful>()
109109
.map(|http_err| http_err.display_short())
110110
.unwrap_or_else(|| e.root_cause().to_string());
111+
let left_retries = self.max_retries - self.retries;
111112
let msg = format!(
112-
"spurious network error ({} tries remaining): {err_msg}",
113-
self.max_retries - self.retries,
113+
"spurious network error ({} {} remaining): {err_msg}",
114+
left_retries,
115+
if left_retries != 1 { "tries" } else { "try" }
114116
);
115117
if let Err(e) = self.gctx.shell().warn(msg) {
116118
return RetryResult::Err(e);

0 commit comments

Comments
 (0)