restore some unintended changes
This commit is contained in:
1 parent
4b1ebca4ca
commit
d1155d159c
2 files changed
+12
-13
No files matched your search
@@ -19,7 +19,7 @@
|
|||||||
[discord-url]: https://discord.gg/XgGxMSkvUM
|
[discord-url]: https://discord.gg/XgGxMSkvUM
|
||||||
|
|
||||||
[Website](https://dioxuslabs.com) |
|
[Website](https://dioxuslabs.com) |
|
||||||
[Guides](https://dioxuslabs.com/guide/) |
|
[Guides](https://dioxuslabs.com/docs/0.3/guide/en/) |
|
||||||
[API Docs](https://docs.rs/dioxus-autofmt/latest/dioxus_autofmt) |
|
[API Docs](https://docs.rs/dioxus-autofmt/latest/dioxus_autofmt) |
|
||||||
[Chat](https://discord.gg/XgGxMSkvUM)
|
[Chat](https://discord.gg/XgGxMSkvUM)
|
||||||
|
|
||||||
|
|||||||
@@ -143,22 +143,21 @@ impl<T> UseFuture<T> {
|
|||||||
self.task.get()
|
self.task.get()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the current stateof the future.
|
/// Get the current state of the future.
|
||||||
pub fn state(&self) -> UseFutureState<T> {
|
pub fn state(&self) -> UseFutureState<T> {
|
||||||
todo!()
|
match (&self.task.get(), &self.value()) {
|
||||||
// match (&self.task.get(), &self.value) {
|
// If we have a task and an existing value, we're reloading
|
||||||
// // If we have a task and an existing value, we're reloading
|
(Some(_), Some(val)) => UseFutureState::Reloading(val),
|
||||||
// (Some(_), Some(val)) => UseFutureState::Reloading(val),
|
|
||||||
|
|
||||||
// // no task, but value - we're done
|
// no task, but value - we're done
|
||||||
// (None, Some(val)) => UseFutureState::Complete(val),
|
(None, Some(val)) => UseFutureState::Complete(val),
|
||||||
|
|
||||||
// // no task, no value - something's wrong? return pending
|
// no task, no value - something's wrong? return pending
|
||||||
// (None, None) => UseFutureState::Pending,
|
(None, None) => UseFutureState::Pending,
|
||||||
|
|
||||||
// // Task, no value - we're still pending
|
// Task, no value - we're still pending
|
||||||
// (Some(_), None) => UseFutureState::Pending,
|
(Some(_), None) => UseFutureState::Pending,
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user