Skip to content

Commit a7d7821

Browse files
committed
crate download: don't print that a crate was the largest download if it was the only download
before: Updating crates.io index Downloaded procs v0.8.4 Downloaded 1 crates (1.1 MB) in 2.90s (largest was `procs` at 1.1 MB) Installing procs v0.8.4 after: Updating crates.io index Downloaded procs v0.8.4 Downloaded 1 crates (1.1 MB) in 1.50s Installing procs v0.8.4
1 parent b48ae60 commit a7d7821

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/cargo/core/package.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,10 @@ impl<'a, 'cfg> Drop for Downloads<'a, 'cfg> {
951951
ByteSize(self.downloaded_bytes),
952952
util::elapsed(self.start.elapsed())
953953
);
954-
if self.largest.0 > ByteSize::mb(1).0 {
954+
// print the size of largest crate if it was >1mb
955+
// however don't print if only a single crate was downloaded
956+
// because it is obvious that it will be the largest then
957+
if self.largest.0 > ByteSize::mb(1).0 && self.downloads_finished > 1 {
955958
status.push_str(&format!(
956959
" (largest was `{}` at {})",
957960
self.largest.1,

0 commit comments

Comments
 (0)