Skip to content

Commit 48393ab

Browse files
author
Timothée Haudebourg
committed
Better justification for the use of f64::to_bits
1 parent 9046e3f commit 48393ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/number.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ impl core::hash::Hash for N {
5454
N::PosInt(i) => i.hash(h),
5555
N::NegInt(i) => i.hash(h),
5656
N::Float(f) => {
57-
// Using `f64::to_bits` here is fine since any float values are always finite.
57+
// Using `f64::to_bits` here is fine since any float values are never `Nan`.
5858
f.to_bits().hash(h);
5959
}
6060
}

0 commit comments

Comments
 (0)