wip: make warnings go away

This commit is contained in:
Jonathan Kelley committed 2021-12-13 00:16:05 -05:00
1 parent 597a0456f5
commit 0545d27182
4 files changed
+14 -14

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
use dioxus_core::{prelude::Context, AnyContext, Scope, ScopeId}; use dioxus_core::{AnyContext, Scope, ScopeId};
use std::{ use std::{
cell::{Cell, Ref, RefCell, RefMut}, cell::{Cell, Ref, RefCell, RefMut},
collections::HashSet, collections::HashSet,
+1 -1
View File
@@ -1,4 +1,4 @@
use dioxus_core::{AnyContext, Context, Scope}; use dioxus_core::{AnyContext, Scope};
use futures::Future; use futures::Future;
use std::{ use std::{
cell::{Cell, RefCell}, cell::{Cell, RefCell},
+4 -4
View File
@@ -4,7 +4,7 @@
//! //!
//! In these cases, we provide `use_model` - a convenient way of abstracting over some state and async functions. //! In these cases, we provide `use_model` - a convenient way of abstracting over some state and async functions.
use dioxus_core::prelude::{AnyContext, Context}; use dioxus_core::prelude::AnyContext;
use futures::Future; use futures::Future;
use std::{ use std::{
cell::{Cell, Ref, RefCell, RefMut}, cell::{Cell, Ref, RefCell, RefMut},
@@ -74,7 +74,7 @@ impl<'a, T: 'static> UseModel<'a, T> {
(self.read(), self) (self.read(), self)
} }
pub fn start(&self, f: impl FnOnce() -> ModelTask) { pub fn start(&self, _f: impl FnOnce() -> ModelTask) {
todo!() todo!()
} }
} }
@@ -82,8 +82,8 @@ impl<'a, T: 'static> UseModel<'a, T> {
// keep a coroutine going // keep a coroutine going
pub fn use_model_coroutine<'a, T, F: Future<Output = ()> + 'static>( pub fn use_model_coroutine<'a, T, F: Future<Output = ()> + 'static>(
cx: &dyn AnyContext<'a>, cx: &dyn AnyContext<'a>,
model: UseModel<T>, _model: UseModel<T>,
f: impl FnOnce(AppModels) -> F, _f: impl FnOnce(AppModels) -> F,
) -> UseModelCoroutine { ) -> UseModelCoroutine {
let cx = cx.get_scope(); let cx = cx.get_scope();
cx.use_hook( cx.use_hook(
+8 -8
View File
@@ -1,11 +1,11 @@
use dioxus_core::prelude::Context; // use dioxus_core::prelude::Context;
use std::{ // use std::{
borrow::{Borrow, BorrowMut}, // borrow::{Borrow, BorrowMut},
cell::{Cell, Ref, RefCell, RefMut}, // cell::{Cell, Ref, RefCell, RefMut},
fmt::{Debug, Display}, // fmt::{Debug, Display},
ops::Not, // ops::Not,
rc::Rc, // rc::Rc,
}; // };
// /// Store state between component renders! // /// Store state between component renders!
// /// // ///