mirror of
https://github.com/fluencelabs/marine-rs-sdk-test
synced 2024-12-04 15:20:18 +00:00
fix boolean vec ser scheme
This commit is contained in:
parent
77397bb87d
commit
766da0bf0f
@ -28,8 +28,14 @@ pub(crate) fn generate_vector_ser(
|
||||
arg_name: &str,
|
||||
) -> proc_macro2::TokenStream {
|
||||
let values_ser = match value_ty {
|
||||
ParsedType::Boolean(_)
|
||||
| ParsedType::I8(_)
|
||||
ParsedType::Boolean(_) => {
|
||||
quote! {
|
||||
let converted_bool_vector: Vec<u8> = arg.into_iter().map(|v| v as u8).collect::<_>();
|
||||
fluence::internal::add_object_to_release(Box::new(converted_bool_vector));
|
||||
(converted_bool_vector.as_ptr() as _, converted_bool_vector.len() as _)
|
||||
}
|
||||
},
|
||||
ParsedType::I8(_)
|
||||
| ParsedType::U8(_)
|
||||
| ParsedType::I16(_)
|
||||
| ParsedType::U16(_)
|
||||
|
Loading…
Reference in New Issue
Block a user