mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-16 14:31:22 +00:00
Don't convert boolean arguments going to wasm
The wasm spec defines boolean conversion when crossing to the wasm type i32 as 1 for `true` and 0 for `false`, so no need for us to do it ourselves!
This commit is contained in:
@ -401,7 +401,7 @@ impl<'a, 'b> Js2Rust<'a, 'b> {
|
||||
name = name
|
||||
));
|
||||
}
|
||||
self.rust_arguments.push(format!("{} ? 1 : 0", name));
|
||||
self.rust_arguments.push(format!("{}", name));
|
||||
}
|
||||
Descriptor::Char => {
|
||||
self.js_arguments.push((name.clone(), "string".to_string()));
|
||||
|
Reference in New Issue
Block a user