fix:nan shouldn't be allowed

This commit is contained in:
Sheng-Yan, Zhang 2024-08-24 09:10:54 +08:00
parent c9d74360bf
commit 70ccd97a05

View file

@ -9,7 +9,7 @@ pub struct OrderedFloat(f64);
impl OrderedFloat {
#[inline]
pub fn new(t: f64) -> Self {
debug_assert!(t.is_nan());
debug_assert!(!t.is_nan());
Self(t)
}