From f34da06d924d1f3ebf234e758eede19753ce81b4 Mon Sep 17 00:00:00 2001 From: Shoyu Vanilla Date: Thu, 9 Jan 2025 01:38:21 +0900 Subject: [PATCH] Remove redundant requirement condition --- library/core/src/convert/num.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/core/src/convert/num.rs b/library/core/src/convert/num.rs index 14f6c46066a47..69f16801b9952 100644 --- a/library/core/src/convert/num.rs +++ b/library/core/src/convert/num.rs @@ -32,9 +32,7 @@ macro_rules! impl_float_to_int { impl FloatToInt<$Int> for $Float { #[inline] #[requires( - !self.is_nan() && - self.is_finite() && - float_to_int_in_range::<$Float, $Int>(self) + self.is_finite() && float_to_int_in_range::<$Float, $Int>(self) )] unsafe fn to_int_unchecked(self) -> $Int { // SAFETY: the safety contract must be upheld by the caller.