Replace ViewContext::spawn
with ViewContext::spawn_weak
This commit is contained in:
parent
09f7e41907
commit
94c2eaad23
20 changed files with 83 additions and 73 deletions
|
@ -238,7 +238,7 @@ impl<D: PickerDelegate> Picker<D> {
|
|||
pub fn update_matches(&mut self, query: String, cx: &mut ViewContext<Self>) {
|
||||
let update = self.delegate.update_matches(query, cx);
|
||||
self.matches_updated(cx);
|
||||
self.pending_update_matches = cx.spawn_weak(|this, mut cx| async move {
|
||||
self.pending_update_matches = cx.spawn(|this, mut cx| async move {
|
||||
update.await;
|
||||
this.upgrade(&cx)?
|
||||
.update(&mut cx, |this, cx| this.matches_updated(cx))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue