Skip to content

Commit f3e1322

Browse files
committed
Auto merge of #9440 - ehuss:fix-metrics-test, r=Eh2406
Fix problem with metrics test. The `counter_zero_slot` test was checking for an assertion that only fires in a debug build. However, upstream `rust-lang/rust` runs tests in `--release` mode. This unblocks the upstream update.
2 parents 6701e33 + 58ab9c1 commit f3e1322

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cargo/util/counter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub struct MetricsCounter<const N: usize> {
1212
impl<const N: usize> MetricsCounter<N> {
1313
/// Creates a new counter with an initial value.
1414
pub fn new(init: usize, init_at: Instant) -> Self {
15-
debug_assert!(N > 0, "number of slots must be greater than zero");
15+
assert!(N > 0, "number of slots must be greater than zero");
1616
Self {
1717
slots: [(init, init_at); N],
1818
index: 0,

0 commit comments

Comments
 (0)