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
|
@ -98,7 +98,7 @@ impl PickerDelegate for KernelPickerDelegate {
|
|||
|
||||
if query.is_empty() {
|
||||
self.filtered_kernels = all_kernels;
|
||||
return Task::Ready(Some(()));
|
||||
return Task::ready(());
|
||||
}
|
||||
|
||||
self.filtered_kernels = if query.is_empty() {
|
||||
|
@ -110,7 +110,7 @@ impl PickerDelegate for KernelPickerDelegate {
|
|||
.collect()
|
||||
};
|
||||
|
||||
return Task::Ready(Some(()));
|
||||
return Task::ready(());
|
||||
}
|
||||
|
||||
fn confirm(&mut self, _secondary: bool, cx: &mut ViewContext<Picker<Self>>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue