]> git.proxmox.com Git - cargo.git/commitdiff
Fix debug panic on download with redirect body.
authorEric Huss <eric@huss.org>
Fri, 5 Nov 2021 23:06:32 +0000 (16:06 -0700)
committerEric Huss <eric@huss.org>
Fri, 5 Nov 2021 23:06:32 +0000 (16:06 -0700)
src/cargo/core/package.rs

index 724e720866aaac31a5339d6f4f2910e0399f3a8c..dd73ea25c24349d2e4e9a9c6352c44565afe1b93 100644 (file)
@@ -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();