]> git.proxmox.com Git - cargo.git/commitdiff
Fix problem with metrics test.
authorEric Huss <eric@huss.org>
Fri, 30 Apr 2021 21:03:16 +0000 (14:03 -0700)
committerEric Huss <eric@huss.org>
Fri, 30 Apr 2021 21:03:16 +0000 (14:03 -0700)
src/cargo/util/counter.rs

index 26132afbaad7f42eb058e7e60c6a76b1d58a24a8..82e5addae82f2392d14d8535b2736a2f9855bcf1 100644 (file)
@@ -12,7 +12,7 @@ pub struct MetricsCounter<const N: usize> {
 impl<const N: usize> MetricsCounter<N> {
     /// Creates a new counter with an initial value.
     pub fn new(init: usize, init_at: Instant) -> Self {
-        debug_assert!(N > 0, "number of slots must be greater than zero");
+        assert!(N > 0, "number of slots must be greater than zero");
         Self {
             slots: [(init, init_at); N],
             index: 0,