fix clippy

This commit is contained in:
Evan Almloff 2023-12-27 10:23:56 -06:00
parent e2646e655e
commit 9e9b7a2459
3 changed files with 3 additions and 6 deletions

View file

@ -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, "<div>Waiting for... child</div>");

View file

@ -98,6 +98,7 @@ fn text_nodes() {
);
}
#[allow(non_snake_case)]
#[test]
fn components_hydrate() {
fn app(cx: Scope) -> Element {

View file

@ -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);
}