Unverified Commit 52429e07 by Enkelmann Committed by GitHub

assert that bitvectors representing booleans are 0 or 1 (#270)

parent 933a929c
......@@ -84,6 +84,7 @@ impl BitvectorExtended for Bitvector {
if self.is_zero() {
Ok(Bitvector::from_u8(1))
} else {
assert_eq!(self, &Bitvector::from_u8(1)); // Any other value would indicate a bug.
Ok(Bitvector::from_u8(0))
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment