Skip to content

Commit 6fc356e

Browse files
committed
Auto merge of #6920 - matthiaskrgr:downloaded_crateS, r=Eh2406
download: fix "Downloaded 1 crates" message (crates -> crate)
2 parents 7c99542 + dd47416 commit 6fc356e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/cargo/core/package.rs

+8-1
Original file line numberDiff line numberDiff line change
@@ -945,9 +945,16 @@ impl<'a, 'cfg> Drop for Downloads<'a, 'cfg> {
945945
if !self.success {
946946
return;
947947
}
948+
// pick the correct plural of crate(s)
949+
let crate_string = if self.downloads_finished == 1 {
950+
"crate"
951+
} else {
952+
"crates"
953+
};
948954
let mut status = format!(
949-
"{} crates ({}) in {}",
955+
"{} {} ({}) in {}",
950956
self.downloads_finished,
957+
crate_string,
951958
ByteSize(self.downloaded_bytes),
952959
util::elapsed(self.start.elapsed())
953960
);

0 commit comments

Comments
 (0)