Skip to content

Commit

Permalink
download: fix "Downloaded 1 crates" message (crates -> crate)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed May 8, 2019
1 parent 7c99542 commit dd47416
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/cargo/core/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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())
);
Expand Down

0 comments on commit dd47416

Please sign in to comment.