Skip to content

Commit 22c4e34

Browse files
lemmihmbrubeck
authored andcommitted
Safety note.
1 parent 696f5ef commit 22c4e34

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1298,6 +1298,7 @@ mod impl_rand {
12981298
UniformSampler::new(low, high)
12991299
}
13001300
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Self::X {
1301+
// UniformFloat.sample() will never return NaN.
13011302
unsafe { NotNan::unchecked_new(self.0.sample(rng)) }
13021303
}
13031304
}

0 commit comments

Comments
 (0)