From 9e9b7a2459b4b40b47cc265e5211865d9171ead1 Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Wed, 27 Dec 2023 10:23:56 -0600 Subject: [PATCH] fix clippy --- packages/core/tests/suspense.rs | 2 +- packages/ssr/tests/hydration.rs | 1 + packages/web/src/rehydrate.rs | 6 +----- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/core/tests/suspense.rs b/packages/core/tests/suspense.rs index abce7f8a6..1a7ab3d58 100644 --- a/packages/core/tests/suspense.rs +++ b/packages/core/tests/suspense.rs @@ -11,7 +11,7 @@ fn it_works() { let mut dom = VirtualDom::new(app); _ = dom.rebuild(); dom.wait_for_suspense().await; - let out = dioxus_ssr::pre_render(&dom); + let out = dioxus_ssr::render(&dom); assert_eq!(out, "
Waiting for... child
"); diff --git a/packages/ssr/tests/hydration.rs b/packages/ssr/tests/hydration.rs index 360aa0c5f..8c9e9f5c8 100644 --- a/packages/ssr/tests/hydration.rs +++ b/packages/ssr/tests/hydration.rs @@ -98,6 +98,7 @@ fn text_nodes() { ); } +#[allow(non_snake_case)] #[test] fn components_hydrate() { fn app(cx: Scope) -> Element { diff --git a/packages/web/src/rehydrate.rs b/packages/web/src/rehydrate.rs index 2c67cd544..84f92ac19 100644 --- a/packages/web/src/rehydrate.rs +++ b/packages/web/src/rehydrate.rs @@ -1,10 +1,7 @@ use crate::dom::WebsysDom; use dioxus_core::{ - AttributeValue, DynamicNode, ElementId, ScopeState, TemplateNode, VNode, VirtualDom, + DynamicNode, ElementId, ScopeState, TemplateNode, VNode, VirtualDom, }; -use dioxus_html::event_bubbles; -use wasm_bindgen::JsCast; -use web_sys::{Comment, Node}; #[derive(Debug)] pub enum RehydrationError { @@ -76,7 +73,6 @@ impl WebsysDom { for attr in *attrs { if let dioxus_core::TemplateAttribute::Dynamic { id } = attr { let attribute = &vnode.dynamic_attrs[*id]; - let value = &attribute.value; let id = attribute.mounted_element(); mounted_id = Some(id); }