Forráskód Böngészése

chore: make warnings go away

Jonathan Kelley 2 éve
szülő
commit
99a818996e

+ 3 - 5
packages/hooks/src/usecallback.rs

@@ -1,6 +1,4 @@
-use std::rc::Rc;
-
-use dioxus_core::{prelude::EventHandler, ScopeState};
+use dioxus_core::ScopeState;
 use std::future::Future;
 use std::future::Future;
 
 
 #[macro_export]
 #[macro_export]
@@ -30,8 +28,8 @@ where
     move |evt| cx.spawn(hook(evt))
     move |evt| cx.spawn(hook(evt))
 }
 }
 
 
-fn it_works(cx: &ScopeState) {
-    let p = use_callback(cx, || {
+fn _it_works(cx: &ScopeState) {
+    let _p = use_callback(cx, || {
         |()| async {
         |()| async {
             //
             //
         }
         }

+ 3 - 3
packages/hooks/src/usefuture.rs

@@ -51,7 +51,7 @@ where
 
 
         // Clone in our cells
         // Clone in our cells
         let values = state.values.clone();
         let values = state.values.clone();
-        let schedule_update = state.update.clone();
+        let _schedule_update = state.update.clone();
         let waker = state.waker.clone();
         let waker = state.waker.clone();
 
 
         // Cancel the current future
         // Cancel the current future
@@ -67,7 +67,7 @@ where
             match waker.borrow().as_ref() {
             match waker.borrow().as_ref() {
                 Some(waker) => waker.wake_by_ref(),
                 Some(waker) => waker.wake_by_ref(),
                 None => {
                 None => {
-                    println!("scheduling update");
+
                     // schedule_update()
                     // schedule_update()
                 }
                 }
             }
             }
@@ -123,7 +123,7 @@ impl<T> UseFuture<T> {
     }
     }
 
 
     // Manually set the value in the future slot without starting the future over
     // Manually set the value in the future slot without starting the future over
-    pub fn set(&self, new_value: T) {
+    pub fn set(&self, _new_value: T) {
         // self.slot.set(Some(new_value));
         // self.slot.set(Some(new_value));
         // self.needs_regen.set(true);
         // self.needs_regen.set(true);
         // (self.update)();
         // (self.update)();