Skip to content

Commit b3e112d

Browse files
fix: Segfault on dropping picker mid-rescan (#465)
1 parent 8cb1f47 commit b3e112d

13 files changed

Lines changed: 687 additions & 223 deletions

File tree

crates/fff-core/benches/memmem_bench.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,6 @@ fn bench_memmem(c: &mut Criterion) {
8383
b.iter(|| black_box(case_insensitive_memmem::search(h, n)));
8484
},
8585
);
86-
87-
group.bench_with_input(
88-
BenchmarkId::new("scalar_baseline", &id),
89-
&(haystack, &needle_lower),
90-
|b, &(h, n)| {
91-
b.iter(|| black_box(case_insensitive_memmem::search_scalar(h, n)));
92-
},
93-
);
9486
}
9587
}
9688

crates/fff-core/src/background_watcher.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -587,12 +587,13 @@ fn handle_debounced_events(
587587
}
588588

589589
overflow_count = picker.get_overflow_files().len();
590-
info!(
591-
files_updated = files_to_update_git_status.len(),
592-
overflow_count, "File index changes applied",
593-
);
594590
}
595591

592+
info!(
593+
files_updated = files_to_update_git_status.len(),
594+
overflow_count, "File index changes applied",
595+
);
596+
596597
if need_full_rescan || overflow_count > MAX_OVERFLOW_FILES {
597598
info!("Watcher faced limit of index overflow. Triggering rescan");
598599
if let Err(e) = shared_picker.trigger_full_rescan_async(shared_frecency) {

0 commit comments

Comments
 (0)