We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ecdb9e3 commit 450ba55Copy full SHA for 450ba55
library/core/src/convert/num.rs
@@ -32,9 +32,7 @@ macro_rules! impl_float_to_int {
32
impl FloatToInt<$Int> for $Float {
33
#[inline]
34
#[requires(
35
- !self.is_nan() &&
36
- self.is_finite() &&
37
- float_to_int_in_range::<$Float, $Int>(self)
+ self.is_finite() && float_to_int_in_range::<$Float, $Int>(self)
38
)]
39
unsafe fn to_int_unchecked(self) -> $Int {
40
// SAFETY: the safety contract must be upheld by the caller.
0 commit comments