Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Remove `Task::get_ready` method I added, which is unusable in practice (#22012)

Michael Sloan6e1cc5dad32f
diff --git a/crates/gpui/src/executor.rs b/crates/gpui/src/executor.rs
index 7dc6098fef4..1015b2bcc65 100644
--- a/crates/gpui/src/executor.rs
+++ b/crates/gpui/src/executor.rs
@@ -67,15 +67,6 @@ impl<T> Task<T> {
Task(TaskState::Ready(Some(val)))
}
- /// Returns the task's result if it is already know. The only known usecase for this is for
- /// skipping spawning another task that awaits on this one.
- pub fn get_ready(self) -> Option<T> {
- match self {
- Task(TaskState::Ready(val)) => val,
- Task(TaskState::Spawned(_)) => None,
- }
- }
-
/// Detaching a task runs it to completion in the background
pub fn detach(self) {
match self {