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
|
@ -443,7 +443,7 @@ impl LanguageServer {
|
|||
let stderr_captures = stderr_capture.clone();
|
||||
cx.spawn(|_| Self::handle_stderr(stderr, io_handlers, stderr_captures).log_err())
|
||||
})
|
||||
.unwrap_or_else(|| Task::Ready(Some(None)));
|
||||
.unwrap_or_else(|| Task::ready(None));
|
||||
let input_task = cx.spawn(|_| async move {
|
||||
let (stdout, stderr) = futures::join!(stdout_input_task, stderr_input_task);
|
||||
stdout.or(stderr)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue