From 27705ead8a0bbe551d13b5e63bb3ea3171c0ac9f Mon Sep 17 00:00:00 2001 From: Lokathor Date: Thu, 5 Sep 2019 08:33:34 -0600 Subject: [PATCH] use sebug_assertions --- src/math/lgamma_r.rs | 4 ++-- src/math/lgammaf_r.rs | 4 ++-- src/math/rem_pio2_large.rs | 4 ++-- src/math/sincos.rs | 4 ++-- src/math/sincosf.rs | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/math/lgamma_r.rs b/src/math/lgamma_r.rs index 382a501..9533e88 100644 --- a/src/math/lgamma_r.rs +++ b/src/math/lgamma_r.rs @@ -270,9 +270,9 @@ pub fn lgamma_r(mut x: f64) -> (f64, i32) { p2 = 1.0 + y * (V1 + y * (V2 + y * (V3 + y * (V4 + y * V5)))); r += -0.5 * y + p1 / p2; } - #[cfg(feature = "checked")] + #[cfg(debug_assertions)] _ => unreachable!(), - #[cfg(not(feature = "checked"))] + #[cfg(not(debug_assertions))] _ => {} } } else if ix < 0x40200000 { diff --git a/src/math/lgammaf_r.rs b/src/math/lgammaf_r.rs index 0745359..c5e559f 100644 --- a/src/math/lgammaf_r.rs +++ b/src/math/lgammaf_r.rs @@ -205,9 +205,9 @@ pub fn lgammaf_r(mut x: f32) -> (f32, i32) { p2 = 1.0 + y * (V1 + y * (V2 + y * (V3 + y * (V4 + y * V5)))); r += -0.5 * y + p1 / p2; } - #[cfg(feature = "checked")] + #[cfg(debug_assertions)] _ => unreachable!(), - #[cfg(not(feature = "checked"))] + #[cfg(not(debug_assertions))] _ => {} } } else if ix < 0x41000000 { diff --git a/src/math/rem_pio2_large.rs b/src/math/rem_pio2_large.rs index 8533dc2..002ce2e 100644 --- a/src/math/rem_pio2_large.rs +++ b/src/math/rem_pio2_large.rs @@ -461,9 +461,9 @@ pub(crate) fn rem_pio2_large(x: &[f64], y: &mut [f64], e0: i32, prec: usize) -> i!(y, 2, =, -fw); } } - #[cfg(feature = "checked")] + #[cfg(debug_assertions)] _ => unreachable!(), - #[cfg(not(feature = "checked"))] + #[cfg(not(debug_assertions))] _ => {} } n & 7 diff --git a/src/math/sincos.rs b/src/math/sincos.rs index 750908d..d49f65c 100644 --- a/src/math/sincos.rs +++ b/src/math/sincos.rs @@ -51,9 +51,9 @@ pub fn sincos(x: f64) -> (f64, f64) { 1 => (c, -s), 2 => (-s, -c), 3 => (-c, s), - #[cfg(feature = "checked")] + #[cfg(debug_assertions)] _ => unreachable!(), - #[cfg(not(feature = "checked"))] + #[cfg(not(debug_assertions))] _ => (0.0, 1.0), } } diff --git a/src/math/sincosf.rs b/src/math/sincosf.rs index bb9a003..d4e0772 100644 --- a/src/math/sincosf.rs +++ b/src/math/sincosf.rs @@ -115,9 +115,9 @@ pub fn sincosf(x: f32) -> (f32, f32) { 1 => (c, -s), 2 => (-s, -c), 3 => (-c, s), - #[cfg(feature = "checked")] + #[cfg(debug_assertions)] _ => unreachable!(), - #[cfg(not(feature = "checked"))] + #[cfg(not(debug_assertions))] _ => (0.0, 1.0), } }