From 56b027ef331250e71bda3c3d1e668b08de7a1ef1 Mon Sep 17 00:00:00 2001 From: Evan Almloff Date: Wed, 7 Dec 2022 17:24:50 -0600 Subject: [PATCH] fix more lints --- packages/core/src/virtual_dom.rs | 9 +-------- packages/web/src/lib.rs | 12 ++++++------ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/packages/core/src/virtual_dom.rs b/packages/core/src/virtual_dom.rs index f7500af2b..7a7c516f6 100644 --- a/packages/core/src/virtual_dom.rs +++ b/packages/core/src/virtual_dom.rs @@ -16,14 +16,7 @@ use crate::{ use futures_util::{pin_mut, StreamExt}; use fxhash::FxHashMap; use slab::Slab; -use std::{ - any::Any, - borrow::BorrowMut, - cell::Cell, - collections::{BTreeSet}, - future::Future, - rc::Rc, -}; +use std::{any::Any, borrow::BorrowMut, cell::Cell, collections::BTreeSet, future::Future, rc::Rc}; /// A virtual node system that progresses user events and diffs UI trees. /// diff --git a/packages/web/src/lib.rs b/packages/web/src/lib.rs index 3c8398852..7e9478614 100644 --- a/packages/web/src/lib.rs +++ b/packages/web/src/lib.rs @@ -53,15 +53,15 @@ // - Do the VDOM work during the idlecallback // - Do DOM work in the next requestAnimationFrame callback -use std::time::Duration; + pub use crate::cfg::Config; use crate::dom::virtual_event_from_websys_event; pub use crate::util::use_eval; use dioxus_core::{Element, ElementId, Scope, VirtualDom}; -use futures_channel::mpsc::unbounded; + use futures_util::{pin_mut, FutureExt, StreamExt}; -use gloo_timers::future::sleep; + mod cache; mod cfg; @@ -181,7 +181,7 @@ pub async fn run_with_props(root: fn(Scope) -> Element, root_prop wasm_bindgen::intern(s); } - let should_hydrate = cfg.hydrate; + let _should_hydrate = cfg.hydrate; let (tx, mut rx) = futures_channel::mpsc::unbounded(); @@ -201,7 +201,7 @@ pub async fn run_with_props(root: fn(Scope) -> Element, root_prop // the mutations come back with nothing - we need to actually mount them websys_dom.mount(); - let mut work_loop = ric_raf::RafLoop::new(); + let _work_loop = ric_raf::RafLoop::new(); loop { log::debug!("waiting for work"); @@ -214,7 +214,7 @@ pub async fn run_with_props(root: fn(Scope) -> Element, root_prop futures_util::select! { _ = work => None, - new_template = hotreload_rx.next() => { + _new_template = hotreload_rx.next() => { todo!("Implement hot reload"); None }