From 6876d2da1c7f03be9b28926f2d66516de2cb2d29 Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Tue, 15 Aug 2023 13:22:06 -0500 Subject: [PATCH] fix clippy --- docs/guide/examples/readme_expanded.rs | 3 ++- packages/native-core/tests/fuzzing.rs | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/guide/examples/readme_expanded.rs b/docs/guide/examples/readme_expanded.rs index 896d365e5..1ec30e57b 100644 --- a/docs/guide/examples/readme_expanded.rs +++ b/docs/guide/examples/readme_expanded.rs @@ -89,7 +89,8 @@ fn app(cx: Scope) -> Element { key: None, // The static template this node will use. The template is stored in a Cell so it can be replaced with a new template when hot rsx reloading is enabled template: std::cell::Cell::new(TEMPLATE), - root_ids: Default::default(), + root_ids: dioxus::core::exports::bumpalo::collections::Vec::new_in(__cx.bump()) + .into(), dynamic_nodes: __cx.bump().alloc([ // The dynamic count text node (dynamic node id 0) __cx.text_node(format_args!("High-Five counter: {0}", count)), diff --git a/packages/native-core/tests/fuzzing.rs b/packages/native-core/tests/fuzzing.rs index 1d1bd881c..4f0a34b70 100644 --- a/packages/native-core/tests/fuzzing.rs +++ b/packages/native-core/tests/fuzzing.rs @@ -187,7 +187,7 @@ fn create_random_dynamic_node(cx: &ScopeState, depth: usize) -> DynamicNode { node_paths: &[&[0]], attr_paths: &[], }), - root_ids: Default::default(), + root_ids: dioxus::core::exports::bumpalo::collections::Vec::new_in(cx.bump()).into(), dynamic_nodes: cx.bump().alloc([cx.component( create_random_element, DepthProps { depth, root: false }, @@ -257,7 +257,8 @@ fn create_random_element(cx: Scope) -> Element { key: None, parent: None, template: Cell::new(template), - root_ids: Default::default(), + root_ids: dioxus::core::exports::bumpalo::collections::Vec::new_in(cx.bump()) + .into(), dynamic_nodes: { let dynamic_nodes: Vec<_> = dynamic_node_types .iter()