Browse Source

fix more lints

Evan Almloff 2 years ago
parent
commit
56b027ef33
2 changed files with 7 additions and 14 deletions
  1. 1 8
      packages/core/src/virtual_dom.rs
  2. 6 6
      packages/web/src/lib.rs

+ 1 - 8
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.
 ///

+ 6 - 6
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<T: 'static>(root: fn(Scope<T>) -> 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<T: 'static>(root: fn(Scope<T>) -> 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<T: 'static>(root: fn(Scope<T>) -> Element, root_prop
 
             futures_util::select! {
                 _ = work => None,
-                new_template = hotreload_rx.next() => {
+                _new_template = hotreload_rx.next() => {
                     todo!("Implement hot reload");
                     None
                 }