mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-27 06:30:20 +00:00
fix release mode
This commit is contained in:
parent
8af39e0f1e
commit
d1b9703ee7
4 changed files with 4 additions and 13 deletions
|
@ -518,16 +518,8 @@ impl VNode {
|
|||
}
|
||||
Element { .. } => {
|
||||
#[cfg(not(debug_assertions))]
|
||||
let id = self.write_element_root(
|
||||
mount,
|
||||
node,
|
||||
idx,
|
||||
&mut attrs,
|
||||
&mut nodes,
|
||||
&[],
|
||||
dom,
|
||||
to,
|
||||
);
|
||||
let id =
|
||||
self.write_element_root(mount, idx, &mut attrs, &mut nodes, &[], dom, to);
|
||||
#[cfg(debug_assertions)]
|
||||
let id = self.write_element_root(
|
||||
mount,
|
||||
|
|
|
@ -57,6 +57,7 @@ impl Properties for () {
|
|||
true
|
||||
}
|
||||
}
|
||||
|
||||
// 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.
|
||||
pub struct EmptyBuilder;
|
||||
|
|
|
@ -271,7 +271,7 @@ impl VirtualDom {
|
|||
};
|
||||
|
||||
let root = dom.new_scope(
|
||||
BoxedAnyProps::new(VProps::new(root, |_, _| unreachable!(), root_props, "root")),
|
||||
BoxedAnyProps::new(VProps::new(root, |_, _| true, root_props, "root")),
|
||||
"app",
|
||||
);
|
||||
|
||||
|
|
|
@ -240,7 +240,6 @@ impl<'a> ToTokens for TemplateRenderer<'a> {
|
|||
|
||||
// Render and release the mutable borrow on context
|
||||
let roots = quote! { #( #root_printer ),* };
|
||||
let root_count = self.roots.len();
|
||||
let node_printer = &context.dynamic_nodes;
|
||||
let dyn_attr_printer = &context.dynamic_attributes;
|
||||
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(
|
||||
#key_tokens,
|
||||
TEMPLATE,
|
||||
Box::new([Default::default();#root_count]),
|
||||
Box::new([ #( #node_printer ),* ]),
|
||||
Box::new([ #( #dyn_attr_printer ),* ]),
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue