diff --git a/examples/smt/tests/smt.rs b/examples/smt/tests/smt.rs index eda865c6..3156b4c0 100644 --- a/examples/smt/tests/smt.rs +++ b/examples/smt/tests/smt.rs @@ -525,7 +525,9 @@ fn test_max() { }) .collect_vec(); - let &[pa, pb, pc] = pais.as_slice() else { unreachable!() }; + let &[_pa, pb, pc] = pais.as_slice() else { + unreachable!() + }; let &[a, b, c] = ais.as_slice() else { unreachable!() }; let max = model.new_ivar(0, 100, "max"); diff --git a/solver/src/reif/mod.rs b/solver/src/reif/mod.rs index 63d0513d..06a650c0 100644 --- a/solver/src/reif/mod.rs +++ b/solver/src/reif/mod.rs @@ -80,10 +80,7 @@ impl ReifExpr { /// Returns true iff a given expression can be negated. pub fn negatable(&self) -> bool { - match self { - ReifExpr::Alternative(_) | ReifExpr::EqMax(_) => false, - _ => true, - } + !matches!(self, ReifExpr::Alternative(_) | ReifExpr::EqMax(_)) } pub fn eval(&self, assignment: &Domains) -> Option {