diff --git a/src/integer.rs b/src/integer.rs index 350454e..6775649 100644 --- a/src/integer.rs +++ b/src/integer.rs @@ -209,8 +209,8 @@ impl TryFrom for Ratio64{ std::num::FpCategory::Nan=>Err(Self::Error::Nan), std::num::FpCategory::Infinite=>Err(Self::Error::Infinite), std::num::FpCategory::Zero=>Ok(Self::ZERO), - std::num::FpCategory::Subnormal=>Err(Self::Error::Subnormal), - std::num::FpCategory::Normal=>ratio64_from_mes(integer_decode_f32(value)), + std::num::FpCategory::Subnormal + |std::num::FpCategory::Normal=>ratio64_from_mes(integer_decode_f32(value)), } } } @@ -222,8 +222,8 @@ impl TryFrom for Ratio64{ std::num::FpCategory::Nan=>Err(Self::Error::Nan), std::num::FpCategory::Infinite=>Err(Self::Error::Infinite), std::num::FpCategory::Zero=>Ok(Self::ZERO), - std::num::FpCategory::Subnormal=>Err(Self::Error::Subnormal), - std::num::FpCategory::Normal=>ratio64_from_mes(integer_decode_f64(value)), + std::num::FpCategory::Subnormal + |std::num::FpCategory::Normal=>ratio64_from_mes(integer_decode_f64(value)), } } } @@ -488,8 +488,8 @@ impl TryFrom for Planar64{ std::num::FpCategory::Nan=>Err(Self::Error::Nan), std::num::FpCategory::Infinite=>Err(Self::Error::Infinite), std::num::FpCategory::Zero=>Ok(Self::ZERO), - std::num::FpCategory::Subnormal=>Err(Self::Error::Subnormal), - std::num::FpCategory::Normal=>planar64_from_mes(integer_decode_f32(value)), + std::num::FpCategory::Subnormal + |std::num::FpCategory::Normal=>planar64_from_mes(integer_decode_f32(value)), } } } @@ -501,8 +501,8 @@ impl TryFrom for Planar64{ std::num::FpCategory::Nan=>Err(Self::Error::Nan), std::num::FpCategory::Infinite=>Err(Self::Error::Infinite), std::num::FpCategory::Zero=>Ok(Self::ZERO), - std::num::FpCategory::Subnormal=>Err(Self::Error::Subnormal), - std::num::FpCategory::Normal=>planar64_from_mes(integer_decode_f64(value)), + std::num::FpCategory::Subnormal + |std::num::FpCategory::Normal=>planar64_from_mes(integer_decode_f64(value)), } } }