cb2a407228
`napi` only supports numbers in 16 and 32-bits. To support Rust numbers with 8 and 16-bits, we can cast them to 32-bits. To convert from 8 and 16-bits to 32-bits, we use their `Into` implementation. To convert from 32-bits to 8 and 16-bits, we use their `TryInto`, we should theorically not fail, but in case of, an `except` message is appended. The code has also been re-indented as it was containing a mix of 2 spaces, 4 spaces and tabs identation. |
||
---|---|---|
.. | ||
bindgen_runtime | ||
js_values | ||
async_cleanup_hook.rs | ||
async_work.rs | ||
call_context.rs | ||
cleanup_env.rs | ||
env.rs | ||
error.rs | ||
lib.rs | ||
promise.rs | ||
status.rs | ||
task.rs | ||
threadsafe_function.rs | ||
tokio_runtime.rs | ||
value_type.rs | ||
version.rs |