From d9e53ac2f6fdc9b659e1b6a812f860c1cf408eab Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 25 Jun 2019 04:55:16 -0700 Subject: [PATCH] Switch to `debug_assert_eq!` in intrinic Reduce the code size of wasm files by avoiding an `assert_eq!` and panic code in production builds. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 0646a416..969269ed 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1072,7 +1072,7 @@ pub mod __rt { #[no_mangle] pub unsafe extern "C" fn __wbindgen_exn_store(idx: u32) { - assert_eq!(GLOBAL_EXNDATA[0], 0); + debug_assert_eq!(GLOBAL_EXNDATA[0], 0); GLOBAL_EXNDATA[0] = 1; GLOBAL_EXNDATA[1] = idx; }