Skip to content

Commit 502c618

Browse files
committed
add debug assertion
1 parent e72b12b commit 502c618

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/segment/src/index/query_optimization/rescore_formula/formula_scorer.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ impl FormulaScorer<'_> {
258258
};
259259

260260
// All decay functions have a range of [0, 1], no need to check for bounds
261+
debug_assert!((0.0..=1.0).contains(&decay));
262+
261263
Ok(decay)
262264
}
263265
}

0 commit comments

Comments
 (0)