From f5be34c3fc29e2f38d3bfd3d0ddb9807ab0a25e4 Mon Sep 17 00:00:00 2001 From: Project Nayuki Date: Thu, 28 Dec 2017 16:18:45 +0000 Subject: [PATCH] Simplified a bit of Rust code. --- rust/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/src/lib.rs b/rust/src/lib.rs index 949642f..8387f58 100644 --- a/rust/src/lib.rs +++ b/rust/src/lib.rs @@ -486,7 +486,7 @@ impl QrCode { 5 => x * y % 2 + x * y % 3 == 0, 6 => (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]; }