Simplified a bit of Rust code.
This commit is contained in:
parent
908dbbfb31
commit
f5be34c3fc
|
@ -486,7 +486,7 @@ impl QrCode {
|
||||||
5 => x * y % 2 + x * y % 3 == 0,
|
5 => x * y % 2 + x * y % 3 == 0,
|
||||||
6 => (x * y % 2 + x * y % 3) % 2 == 0,
|
6 => (x * y % 2 + x * y % 3) % 2 == 0,
|
||||||
7 => ((x + y) % 2 + x * y % 3) % 2 == 0,
|
7 => ((x + y) % 2 + x * y % 3) % 2 == 0,
|
||||||
_ => panic!("Assertion error"),
|
_ => unreachable!(),
|
||||||
};
|
};
|
||||||
*self.module_mut(x, y) ^= invert & !self.isfunction[(y * self.size + x) as usize];
|
*self.module_mut(x, y) ^= invert & !self.isfunction[(y * self.size + x) as usize];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue