From a7d7821e78d741f49bd95edfc82b8ad23ef95124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Tue, 7 May 2019 14:11:40 +0200 Subject: [PATCH] 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 --- src/cargo/core/package.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cargo/core/package.rs b/src/cargo/core/package.rs index 6e3aeace0d0..1b700ca9cdf 100644 --- a/src/cargo/core/package.rs +++ b/src/cargo/core/package.rs @@ -951,7 +951,10 @@ impl<'a, 'cfg> Drop for Downloads<'a, 'cfg> { ByteSize(self.downloaded_bytes), util::elapsed(self.start.elapsed()) ); - if self.largest.0 > ByteSize::mb(1).0 { + // print the size of largest crate if it was >1mb + // however don't print if only a single crate was downloaded + // because it is obvious that it will be the largest then + if self.largest.0 > ByteSize::mb(1).0 && self.downloads_finished > 1 { status.push_str(&format!( " (largest was `{}` at {})", self.largest.1,