Fix problem with metrics test.

This commit is contained in:
Eric Huss 2021-04-30 14:03:16 -07:00
parent 6701e33f69
commit 58ab9c116f

View 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,