From d78815103d39b318cd0f35ae5534e0593aa7006d Mon Sep 17 00:00:00 2001 From: Jonathan Kelley Date: Mon, 3 Jan 2022 02:20:11 -0500 Subject: [PATCH] wip: remove hooks warnigns --- Cargo.toml | 13 +++++++------ packages/hooks/src/usestate/owned.rs | 4 ---- packages/hooks/src/usesuspense.rs | 8 ++++---- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fb15b0600..d2e5dbe2c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,8 +20,7 @@ dioxus-web = { path = "./packages/web", version = "^0.0.2", optional = true } dioxus-desktop = { path = "./packages/desktop", optional = true } dioxus-ssr = { path = "./packages/ssr", optional = true } -dioxus-router = { path = "./packages/router", optional = true } - +# dioxus-router = { path = "./packages/router", optional = true } # dioxus-mobile = { path = "./packages/mobile", optional = true } # dioxus-liveview = { path = "./packages/liveview", optional = true } @@ -31,12 +30,14 @@ default = ["macro", "hooks", "html"] macro = ["dioxus-core-macro"] hooks = ["dioxus-hooks"] html = ["dioxus-html"] -router = ["dioxus-router"] ssr = ["dioxus-ssr"] -web = ["dioxus-web", "dioxus-router/web"] -desktop = ["dioxus-desktop", "dioxus-router/desktop"] - +web = ["dioxus-web"] +desktop = ["dioxus-desktop"] +# router = ["dioxus-router"] +# "dioxus-router/web" +# "dioxus-router/desktop" +# desktop = ["dioxus-desktop", "dioxus-router/desktop"] # mobile = ["dioxus-mobile"] # liveview = ["dioxus-liveview"] diff --git a/packages/hooks/src/usestate/owned.rs b/packages/hooks/src/usestate/owned.rs index 16468e0fd..c4cfef112 100644 --- a/packages/hooks/src/usestate/owned.rs +++ b/packages/hooks/src/usestate/owned.rs @@ -24,10 +24,6 @@ impl UseStateOwned { pub fn modify(&self) -> RefMut { RefMut::map(self.wip.borrow_mut(), |x| x.as_mut().unwrap()) } - - pub fn with(&self, f: impl FnOnce(&mut T)) { - // - } } use std::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign}; diff --git a/packages/hooks/src/usesuspense.rs b/packages/hooks/src/usesuspense.rs index 5b08ac04d..dfd37ac7a 100644 --- a/packages/hooks/src/usesuspense.rs +++ b/packages/hooks/src/usesuspense.rs @@ -20,9 +20,9 @@ pub fn use_suspense + 'static>( let task = cx.push_future(new_fut); SuspenseInner { - task, + _task: task, value: None, - wip_value, + _wip_value: wip_value, } }); @@ -35,7 +35,7 @@ pub fn use_suspense + 'static>( } struct SuspenseInner { - task: TaskId, - wip_value: Rc>>, + _task: TaskId, + _wip_value: Rc>>, value: Option, }