From 94e95e87e7083778f561ebd2b34bb92c5b3a9f86 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Mon, 30 May 2022 16:29:44 +0200 Subject: [PATCH] feat(napi) Extend #1195 to `Vec`. This patch is the sequel of https://github.com/napi-rs/napi-rs/pull/1195 where `ToNapiValue` and `FromNapiValue` are implemented for all `Vec` where `T` is a 8 or 16 bits number. --- crates/napi/src/bindgen_runtime/js_values/array.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/napi/src/bindgen_runtime/js_values/array.rs b/crates/napi/src/bindgen_runtime/js_values/array.rs index 4b40ff58..0f6c6f98 100644 --- a/crates/napi/src/bindgen_runtime/js_values/array.rs +++ b/crates/napi/src/bindgen_runtime/js_values/array.rs @@ -212,6 +212,10 @@ macro_rules! impl_for_primitive_type { }; } +impl_for_primitive_type!(u8); +impl_for_primitive_type!(i8); +impl_for_primitive_type!(u16); +impl_for_primitive_type!(i16); impl_for_primitive_type!(u32); impl_for_primitive_type!(i32); impl_for_primitive_type!(i64);