From f21d099ae4f49f8a99cebbd707f60fdd7c4d9f9c Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Sun, 4 Dec 2022 19:48:16 -0600 Subject: [PATCH] fix mask generation --- packages/native-core-macro/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/native-core-macro/src/lib.rs b/packages/native-core-macro/src/lib.rs index 6b9c1735b..6174e756a 100644 --- a/packages/native-core-macro/src/lib.rs +++ b/packages/native-core-macro/src/lib.rs @@ -493,8 +493,8 @@ impl<'a> StateMember<'a> { let mask = self .dep_mems .iter() - .map(|m| m.id) - .fold(self.mem.id, |a, b| a | b); + .map(|m| 1 << m.id) + .fold(1 << self.mem.id, |a, b| a | b); quote! { #[derive(Clone, Copy)] struct #unit_type; @@ -510,7 +510,7 @@ impl<'a> StateMember<'a> { &[#(dioxus_native_core::PassId(#dependants)),*] } fn mask(&self) -> dioxus_native_core::MemberMask { - dioxus_native_core::MemberMask(1 << #mask) + dioxus_native_core::MemberMask(#mask) } } }