From 3d20973ebd52a9e4268c71dea765a3f302a0a895 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Fri, 5 Nov 2021 16:06:32 -0700 Subject: [PATCH] Fix debug panic on download with redirect body. --- src/cargo/core/package.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cargo/core/package.rs b/src/cargo/core/package.rs index 724e720866a..dd73ea25c24 100644 --- a/src/cargo/core/package.rs +++ b/src/cargo/core/package.rs @@ -1006,7 +1006,7 @@ impl<'a, 'cfg> Downloads<'a, 'cfg> { let dl = &self.pending[&token].0; dl.total.set(total); let now = Instant::now(); - if cur != dl.current.get() { + if cur > dl.current.get() { let delta = cur - dl.current.get(); let threshold = self.next_speed_check_bytes_threshold.get();