From 6e1cc5dad32fbff62cb7f2fa59c3e0c27fb6f9fc Mon Sep 17 00:00:00 2001 From: Michael Sloan Date: Sat, 14 Dec 2024 03:21:41 -0700 Subject: [PATCH] Remove `Task::get_ready` method I added, which is unusable in practice (#22012) Does seem like such a mechanism should be possible, but not yet sure how to define it. Release Notes: - N/A --- crates/gpui/src/executor.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/crates/gpui/src/executor.rs b/crates/gpui/src/executor.rs index 7dc6098fef4f0acc81f8741652c5a426fd0c12e1..1015b2bcc65abd7f11bddd62bb6922c1bc27557b 100644 --- a/crates/gpui/src/executor.rs +++ b/crates/gpui/src/executor.rs @@ -67,15 +67,6 @@ impl Task { 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 { - 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 {