Replace ViewContext::spawn with ViewContext::spawn_weak

This commit is contained in:
Antonio Scandurra
2023-04-26 10:23:27 +02:00
parent 09f7e41907
commit 94c2eaad23
20 changed files with 83 additions and 73 deletions
+1 -1
View File
@@ -582,7 +582,7 @@ impl BufferSearchBar {
let matches = active_searchable_item.find_matches(query, cx);
let active_searchable_item = active_searchable_item.downgrade();
self.pending_search = Some(cx.spawn_weak(|this, mut cx| async move {
self.pending_search = Some(cx.spawn(|this, mut cx| async move {
let matches = matches.await;
if let Some(this) = this.upgrade(&cx) {
this.update(&mut cx, |this, cx| {