mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-15 22:11:23 +00:00
Only generate JS null checks in debug mode
In non-debug mode Rust is already checking these pointers, so let's only generate the relevant code in debug mode.
This commit is contained in:
@ -985,7 +985,7 @@ impl ToTokens for ast::Enum {
|
||||
_extra: &mut ::wasm_bindgen::convert::Stack,
|
||||
) -> Self {
|
||||
#(#cast_clauses else)* {
|
||||
::wasm_bindgen::throw("invalid enum value passed")
|
||||
::wasm_bindgen::throw_str("invalid enum value passed")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user