fix bool vec

This commit is contained in:
vms 2021-04-25 00:52:14 +03:00
parent ba7af66ca8
commit f1cfca6f15

View File

@ -30,7 +30,7 @@ pub(crate) fn generate_vector_ser(
let values_ser = match value_ty { let values_ser = match value_ty {
ParsedType::Boolean(_) => { ParsedType::Boolean(_) => {
quote! { quote! {
let converted_bool_vector: Vec<u8> = arg.into_iter().map(|v| v as u8).collect::<_>(); 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)); fluence::internal::add_object_to_release(Box::new(converted_bool_vector));
(converted_bool_vector.as_ptr() as _, converted_bool_vector.len() as _) (converted_bool_vector.as_ptr() as _, converted_bool_vector.len() as _)
} }