remove unused once-cell in memo (#2311)

This commit is contained in:
Evan Almloff 2024-04-25 12:58:42 -05:00 committed by GitHub
parent cf6998b5ba
commit b30b363460
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 0 additions and 6 deletions

View file

@ -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};

View file

@ -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() {