fix release mode
This commit is contained in:
1 parent
8af39e0f1e
commit
d1b9703ee7
4 files changed
+4
-13
No files matched your search
@@ -518,16 +518,8 @@ impl VNode {
|
|||||||
}
|
}
|
||||||
Element { .. } => {
|
Element { .. } => {
|
||||||
#[cfg(not(debug_assertions))]
|
#[cfg(not(debug_assertions))]
|
||||||
let id = self.write_element_root(
|
let id =
|
||||||
mount,
|
self.write_element_root(mount, idx, &mut attrs, &mut nodes, &[], dom, to);
|
||||||
node,
|
|
||||||
idx,
|
|
||||||
&mut attrs,
|
|
||||||
&mut nodes,
|
|
||||||
&[],
|
|
||||||
dom,
|
|
||||||
to,
|
|
||||||
);
|
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
let id = self.write_element_root(
|
let id = self.write_element_root(
|
||||||
mount,
|
mount,
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ impl Properties for () {
|
|||||||
true
|
true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// We allow components to use the () generic parameter if they have no props. This impl enables the "build" method
|
// We allow components to use the () generic parameter if they have no props. This impl enables the "build" method
|
||||||
// that the macros use to anonymously complete prop construction.
|
// that the macros use to anonymously complete prop construction.
|
||||||
pub struct EmptyBuilder;
|
pub struct EmptyBuilder;
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ impl VirtualDom {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let root = dom.new_scope(
|
let root = dom.new_scope(
|
||||||
BoxedAnyProps::new(VProps::new(root, |_, _| unreachable!(), root_props, "root")),
|
BoxedAnyProps::new(VProps::new(root, |_, _| true, root_props, "root")),
|
||||||
"app",
|
"app",
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -240,7 +240,6 @@ impl<'a> ToTokens for TemplateRenderer<'a> {
|
|||||||
|
|
||||||
// Render and release the mutable borrow on context
|
// Render and release the mutable borrow on context
|
||||||
let roots = quote! { #( #root_printer ),* };
|
let roots = quote! { #( #root_printer ),* };
|
||||||
let root_count = self.roots.len();
|
|
||||||
let node_printer = &context.dynamic_nodes;
|
let node_printer = &context.dynamic_nodes;
|
||||||
let dyn_attr_printer = &context.dynamic_attributes;
|
let dyn_attr_printer = &context.dynamic_attributes;
|
||||||
let node_paths = context.node_paths.iter().map(|it| quote!(&[#(#it),*]));
|
let node_paths = context.node_paths.iter().map(|it| quote!(&[#(#it),*]));
|
||||||
@@ -256,7 +255,6 @@ impl<'a> ToTokens for TemplateRenderer<'a> {
|
|||||||
::dioxus::core::VNode::new(
|
::dioxus::core::VNode::new(
|
||||||
#key_tokens,
|
#key_tokens,
|
||||||
TEMPLATE,
|
TEMPLATE,
|
||||||
Box::new([Default::default();#root_count]),
|
|
||||||
Box::new([ #( #node_printer ),* ]),
|
Box::new([ #( #node_printer ),* ]),
|
||||||
Box::new([ #( #dyn_attr_printer ),* ]),
|
Box::new([ #( #dyn_attr_printer ),* ]),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in new issue
Block a user