Hide the implementation of Task
(#22009)
The `Option<T>` within `Ready` is confusing and using `None` for it can cause crashes. There was actually one instance of this! Release Notes: - N/A
This commit is contained in:
parent
1ac60289fe
commit
c5fe6ef100
6 changed files with 28 additions and 16 deletions
|
@ -1651,7 +1651,7 @@ impl Workspace {
|
|||
F: 'static + FnOnce(&mut Workspace, &mut ViewContext<Workspace>) -> T,
|
||||
{
|
||||
if self.project.read(cx).is_local() {
|
||||
Task::Ready(Some(Ok(callback(self, cx))))
|
||||
Task::ready(Ok(callback(self, cx)))
|
||||
} else {
|
||||
let env = self.project.read(cx).cli_environment(cx);
|
||||
let task = Self::new_local(Vec::new(), self.app_state.clone(), None, env, cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue