diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index d82bd19..7867625 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -41,7 +41,7 @@ jobs: matrix: os: [macOS-latest, ubuntu-latest, windows-latest] toolchain: - - 1.65.0 # Minimum. + - 1.70.0 # Minimum. - stable - beta steps: diff --git a/Cargo.toml b/Cargo.toml index 0a221c3..b48efa8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ name = "decorum" version = "0.3.1" edition = "2021" +rust-version = "1.70.0" license = "MIT" readme = "README.md" authors = ["Sean Olson "] diff --git a/src/expression.rs b/src/expression.rs index 0815ed7..43161a7 100644 --- a/src/expression.rs +++ b/src/expression.rs @@ -532,12 +532,11 @@ where const NEG_INFINITY: Self = Defined(InfinityEncoding::NEG_INFINITY); fn is_infinite(self) -> bool { - self.defined() - .map_or(false, |defined| defined.is_infinite()) + self.defined().is_some_and(InfinityEncoding::is_infinite) } fn is_finite(self) -> bool { - self.defined().map_or(false, |defined| defined.is_finite()) + self.defined().is_some_and(InfinityEncoding::is_finite) } } @@ -587,7 +586,7 @@ where self.as_ref() .defined() .zip(other.as_ref().defined()) - .map_or(false, |(left, right)| left.eq(right)) + .is_some_and(|(left, right)| left.eq(right)) } } @@ -647,11 +646,11 @@ where const LOG10_E: Self = Defined(UnaryRealFunction::LOG10_E); fn is_zero(self) -> bool { - self.defined().map_or(false, |defined| defined.is_zero()) + self.defined().is_some_and(UnaryRealFunction::is_zero) } fn is_one(self) -> bool { - self.defined().map_or(false, |defined| defined.is_one()) + self.defined().is_some_and(UnaryRealFunction::is_one) } fn sign(self) -> Sign {