mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
fix clippy
This commit is contained in:
parent
e2646e655e
commit
9e9b7a2459
3 changed files with 3 additions and 6 deletions
|
@ -11,7 +11,7 @@ fn it_works() {
|
||||||
let mut dom = VirtualDom::new(app);
|
let mut dom = VirtualDom::new(app);
|
||||||
_ = dom.rebuild();
|
_ = dom.rebuild();
|
||||||
dom.wait_for_suspense().await;
|
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>");
|
assert_eq!(out, "<div>Waiting for... child</div>");
|
||||||
|
|
||||||
|
|
|
@ -98,6 +98,7 @@ fn text_nodes() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(non_snake_case)]
|
||||||
#[test]
|
#[test]
|
||||||
fn components_hydrate() {
|
fn components_hydrate() {
|
||||||
fn app(cx: Scope) -> Element {
|
fn app(cx: Scope) -> Element {
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
use crate::dom::WebsysDom;
|
use crate::dom::WebsysDom;
|
||||||
use dioxus_core::{
|
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)]
|
#[derive(Debug)]
|
||||||
pub enum RehydrationError {
|
pub enum RehydrationError {
|
||||||
|
@ -76,7 +73,6 @@ impl WebsysDom {
|
||||||
for attr in *attrs {
|
for attr in *attrs {
|
||||||
if let dioxus_core::TemplateAttribute::Dynamic { id } = attr {
|
if let dioxus_core::TemplateAttribute::Dynamic { id } = attr {
|
||||||
let attribute = &vnode.dynamic_attrs[*id];
|
let attribute = &vnode.dynamic_attrs[*id];
|
||||||
let value = &attribute.value;
|
|
||||||
let id = attribute.mounted_element();
|
let id = attribute.mounted_element();
|
||||||
mounted_id = Some(id);
|
mounted_id = Some(id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue