Browse Source

Fix boolean or comment (#44)

master
Kobi Gurkan 3 years ago
committed by GitHub
parent
commit
a8f737bf26
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/bits/boolean.rs

+ 1
- 1
src/bits/boolean.rs

@ -435,7 +435,7 @@ impl Boolean {
match (self, other) { match (self, other) {
(&Constant(false), x) | (x, &Constant(false)) => Ok(x.clone()), (&Constant(false), x) | (x, &Constant(false)) => Ok(x.clone()),
(&Constant(true), _) | (_, &Constant(true)) => Ok(Constant(true)), (&Constant(true), _) | (_, &Constant(true)) => Ok(Constant(true)),
// a OR b = NOT ((NOT a) AND b)
// a OR b = NOT ((NOT a) AND (NOT b))
(a @ &Is(_), b @ &Not(_)) | (b @ &Not(_), a @ &Is(_)) | (b @ &Not(_), a @ &Not(_)) => { (a @ &Is(_), b @ &Not(_)) | (b @ &Not(_), a @ &Is(_)) | (b @ &Not(_), a @ &Not(_)) => {
Ok(a.not().and(&b.not())?.not()) Ok(a.not().and(&b.not())?.not())
} }

Loading…
Cancel
Save