@@ -812,7 +812,7 @@ fn generate_sub_component(
812812 let mut declared_callbacks_types = vec ! [ ] ;
813813 let mut declared_callbacks_ret = vec ! [ ] ;
814814
815- for property in component. properties . iter ( ) . filter ( |p| p . use_count . get ( ) > 0 ) {
815+ for property in component. properties . iter ( ) {
816816 let prop_ident = ident ( & property. name ) ;
817817 if let Type :: Callback ( callback) = & property. ty {
818818 let callback_args =
@@ -1146,15 +1146,11 @@ fn generate_sub_component(
11461146 }
11471147
11481148 for ( prop, expression) in & component. property_init {
1149- if expression. use_count . get ( ) > 0 && component. prop_used ( prop, root) {
1150- handle_property_init ( prop, expression, & mut init, & ctx)
1151- }
1149+ handle_property_init ( prop, expression, & mut init, & ctx)
11521150 }
11531151 for prop in & component. const_properties {
1154- if component. prop_used ( & prop. clone ( ) . into ( ) , root) {
1155- let rust_property = access_local_member ( prop, & ctx) ;
1156- init. push ( quote ! ( #rust_property. set_constant( ) ; ) )
1157- }
1152+ let rust_property = access_local_member ( prop, & ctx) ;
1153+ init. push ( quote ! ( #rust_property. set_constant( ) ; ) )
11581154 }
11591155
11601156 let parent_component_type = parent_ctx. iter ( ) . map ( |parent| {
@@ -1447,7 +1443,7 @@ fn generate_global(
14471443 let mut declared_callbacks_types = vec ! [ ] ;
14481444 let mut declared_callbacks_ret = vec ! [ ] ;
14491445
1450- for property in global. properties . iter ( ) . filter ( |p| p . use_count . get ( ) > 0 ) {
1446+ for property in global. properties . iter ( ) {
14511447 let prop_ident = ident ( & property. name ) ;
14521448 if let Type :: Callback ( callback) = & property. ty {
14531449 let callback_args =
@@ -1483,9 +1479,6 @@ fn generate_global(
14831479 let declared_functions = generate_functions ( global. functions . as_ref ( ) , & ctx) ;
14841480
14851481 for ( property_index, expression) in global. init_values . iter_enumerated ( ) {
1486- if global. properties [ property_index] . use_count . get ( ) == 0 {
1487- continue ;
1488- }
14891482 if let Some ( expression) = expression. as_ref ( ) {
14901483 handle_property_init (
14911484 & llr:: LocalMemberReference :: from ( property_index) . into ( ) ,
@@ -1496,9 +1489,6 @@ fn generate_global(
14961489 }
14971490 }
14981491 for ( property_index, cst) in global. const_properties . iter_enumerated ( ) {
1499- if global. properties [ property_index] . use_count . get ( ) == 0 {
1500- continue ;
1501- }
15021492 if * cst {
15031493 let rust_property = access_local_member ( & property_index. into ( ) , & ctx) ;
15041494 init. push ( quote ! ( #rust_property. set_constant( ) ; ) )
0 commit comments