use boxed slices instead of vecs where possible

This commit is contained in:
Evan Almloff committed 2024-01-07 13:41:39 -06:00
1 parent c59926cb1f
commit aefa8a2431
9 files changed
+53 -46

No files matched your search

+4 -4
View File
@@ -287,8 +287,8 @@ fn default_handler(error: CapturedError) -> Element {
Some(VNode::new(
None,
TEMPLATE,
Vec::with_capacity(1usize),
vec![error.to_string().into_dyn_node()],
Box::new([Default::default(); 1]),
Box::new([error.to_string().into_dyn_node()]),
Default::default(),
))
}
@@ -460,8 +460,8 @@ pub fn ErrorBoundary(props: ErrorBoundaryProps) -> Element {
VNode::new(
None,
TEMPLATE,
Vec::with_capacity(1usize),
vec![(props.children).into_dyn_node()],
Box::new([Default::default(); 1]),
Box::new([(props.children).into_dyn_node()]),
Default::default(),
)
}),