mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-28 12:11:34 +00:00
Add support for optional bools
This commit is contained in:
committed by
Alex Crichton
parent
0ef528165f
commit
4a0c69ffed
@ -220,6 +220,16 @@ impl FromWasmAbi for bool {
|
||||
}
|
||||
}
|
||||
|
||||
impl OptionIntoWasmAbi for bool {
|
||||
#[inline]
|
||||
fn none() -> u32 { 0xFFFFFFu32 }
|
||||
}
|
||||
|
||||
impl OptionFromWasmAbi for bool {
|
||||
#[inline]
|
||||
fn is_none(js: &u32) -> bool { *js == 0xFFFFFFu32 }
|
||||
}
|
||||
|
||||
impl IntoWasmAbi for char {
|
||||
type Abi = u32;
|
||||
|
||||
|
Reference in New Issue
Block a user