From dd47416a3aecc763190b72c09800f6039192b070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Thu, 9 May 2019 00:13:00 +0200 Subject: [PATCH] download: fix "Downloaded 1 crates" message (crates -> crate) --- src/cargo/core/package.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/cargo/core/package.rs b/src/cargo/core/package.rs index 1b700ca9cdf..ff987906808 100644 --- a/src/cargo/core/package.rs +++ b/src/cargo/core/package.rs @@ -945,9 +945,16 @@ impl<'a, 'cfg> Drop for Downloads<'a, 'cfg> { if !self.success { return; } + // pick the correct plural of crate(s) + let crate_string = if self.downloads_finished == 1 { + "crate" + } else { + "crates" + }; let mut status = format!( - "{} crates ({}) in {}", + "{} {} ({}) in {}", self.downloads_finished, + crate_string, ByteSize(self.downloaded_bytes), util::elapsed(self.start.elapsed()) );