Add unit test for project search

This commit is contained in:
Antonio Scandurra 2022-02-28 11:10:22 +01:00
parent ed89475cf6
commit 720056d0db
4 changed files with 157 additions and 4 deletions

View file

@ -2063,6 +2063,9 @@ impl Project {
let background = cx.background().clone();
let path_count: usize = snapshots.iter().map(|s| s.visible_file_count()).sum();
if path_count == 0 {
return Task::ready(Ok(Default::default()));
}
let workers = background.num_cpus().min(path_count);
let (matching_paths_tx, mut matching_paths_rx) = smol::channel::bounded(1024);
cx.background()