Skip to content

Commit b8f629a

Browse files
committed
WTF, it works
1 parent 77e2b2c commit b8f629a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

crates/project/src/project_search.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,10 @@ impl ProjectSearcher {
7676
get_buffer_for_full_scan_tx,
7777
))
7878
});
79-
self.open_buffers(get_buffer_for_full_scan_rx, find_all_matches_tx, cx)
80-
.await;
81-
worker_pool.await;
79+
let open_buffers =
80+
self.open_buffers(get_buffer_for_full_scan_rx, find_all_matches_tx, cx);
81+
futures::future::join(worker_pool, open_buffers).await;
82+
8283
let limit_reached = matches_count.load(Ordering::Acquire) > MAX_SEARCH_RESULT_RANGES
8384
|| matched_buffer_count.load(Ordering::Acquire) > MAX_SEARCH_RESULT_FILES;
8485
if limit_reached {
@@ -207,7 +208,7 @@ impl Worker<'_> {
207208
},
208209
find_first_match = find_first_match.next() => {
209210
if let Some(buffer_with_at_least_one_match) = find_first_match {
210-
handler.handle_find_first_match(buffer_with_at_least_one_match);
211+
handler.handle_find_first_match(buffer_with_at_least_one_match).await;
211212
}
212213

213214
},

0 commit comments

Comments
 (0)