mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-23 04:33:06 +00:00
remove unused once-cell in memo (#2311)
This commit is contained in:
parent
cf6998b5ba
commit
b30b363460
2 changed files with 0 additions and 6 deletions
|
@ -3,7 +3,6 @@ use generational_box::UnsyncStorage;
|
|||
use std::ops::Deref;
|
||||
|
||||
use dioxus_core::prelude::*;
|
||||
use dioxus_core::ScopeId;
|
||||
|
||||
use generational_box::{GenerationalBox, Storage};
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ use crate::read_impls;
|
|||
use crate::write::Writable;
|
||||
use crate::{read::Readable, ReactiveContext, ReadableRef, Signal};
|
||||
use crate::{CopyValue, ReadOnlySignal};
|
||||
use std::rc::Rc;
|
||||
use std::{
|
||||
cell::RefCell,
|
||||
ops::Deref,
|
||||
|
@ -13,7 +12,6 @@ use std::{
|
|||
use dioxus_core::prelude::*;
|
||||
use futures_util::StreamExt;
|
||||
use generational_box::UnsyncStorage;
|
||||
use once_cell::sync::OnceCell;
|
||||
|
||||
struct UpdateInformation<T> {
|
||||
dirty: Arc<AtomicBool>,
|
||||
|
@ -45,8 +43,6 @@ impl<T: 'static> Memo<T> {
|
|||
let dirty = Arc::new(AtomicBool::new(true));
|
||||
let (tx, mut rx) = futures_channel::mpsc::unbounded();
|
||||
|
||||
let myself: Rc<OnceCell<Memo<T>>> = Rc::new(OnceCell::new());
|
||||
|
||||
let callback = {
|
||||
let dirty = dirty.clone();
|
||||
move || {
|
||||
|
@ -74,7 +70,6 @@ impl<T: 'static> Memo<T> {
|
|||
inner: state,
|
||||
update,
|
||||
};
|
||||
let _ = myself.set(memo);
|
||||
|
||||
spawn_isomorphic(async move {
|
||||
while rx.next().await.is_some() {
|
||||
|
|
Loading…
Reference in a new issue