From 05d01141c5792e7d08cab104b6b1dae1d42e0e50 Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Fri, 12 Jul 2024 12:15:37 -0400 Subject: [PATCH] chore: remove unused AsyncState --- .../src/computed/async_derived/mod.rs | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/reactive_graph/src/computed/async_derived/mod.rs b/reactive_graph/src/computed/async_derived/mod.rs index b32a768c5..1e0e4eadf 100644 --- a/reactive_graph/src/computed/async_derived/mod.rs +++ b/reactive_graph/src/computed/async_derived/mod.rs @@ -13,32 +13,10 @@ pub use future_impls::*; use futures::Future; use pin_project_lite::pin_project; use std::{ - fmt::Debug, pin::Pin, task::{Context, Poll}, }; -#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)] -pub enum AsyncState { - #[default] - Loading, - Complete(T), - Reloading(T), -} - -impl AsyncState { - pub fn current_value(&self) -> Option<&T> { - match &self { - AsyncState::Loading => None, - AsyncState::Complete(val) | AsyncState::Reloading(val) => Some(val), - } - } - - pub fn loading(&self) -> bool { - matches!(&self, AsyncState::Loading | AsyncState::Reloading(_)) - } -} - pin_project! { pub struct ScopedFuture { owner: Option,