From 21d2c00d8870e71a2ffad587654c6dc1f95dbc3d Mon Sep 17 00:00:00 2001 From: Dmitriy Kovalenko Date: Tue, 7 Jul 2026 11:11:27 -0700 Subject: [PATCH] chore: Bump frizbee to 0.11 --- Cargo.lock | 26 ++----------------- Cargo.toml | 2 +- crates/fff-core/src/grep.rs | 2 ++ crates/fff-core/src/score.rs | 2 ++ crates/fff-nvim/benches/fuzzy_search_bench.rs | 16 +----------- 5 files changed, 8 insertions(+), 40 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4a6093b04..0d7d6fe46 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1267,15 +1267,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.17" @@ -1534,13 +1525,9 @@ dependencies = [ [[package]] name = "neo_frizbee" -version = "0.10.4" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12af02496d6e51f324af42ffbd1ed31eb275d4aedd17b18b2cb4542f103f86cb" -dependencies = [ - "itertools 0.14.0", - "raw-cpuid", -] +checksum = "7a2f6120a8da26bea3587731072111062c5d8c51ca3a3a75a716bd8b735d5882" [[package]] name = "nix" @@ -2032,15 +2019,6 @@ dependencies = [ "rand_core 0.9.5", ] -[[package]] -name = "raw-cpuid" -version = "11.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" -dependencies = [ - "bitflags 2.11.0", -] - [[package]] name = "rayon" version = "1.11.0" diff --git a/Cargo.toml b/Cargo.toml index b229f5b97..7aa8454e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ signal-hook-registry = "1.4" zlob = { version = "=1.6.0-dev.7" } mlua = { version = "0.11.1", features = ["module", "luajit"] } -neo_frizbee = { version = "0.10.4", features = ["match_end_col"] } +neo_frizbee = { version = "0.11.0", features = ["match_end_col"] } notify = { version = "9.0.0-rc.3" } notify-debouncer-full = { package = "fff-notify-debouncer-full", version = "0.9.4" } once_cell = "1.20.2" diff --git a/crates/fff-core/src/grep.rs b/crates/fff-core/src/grep.rs index da07688e7..ac7535b62 100644 --- a/crates/fff-core/src/grep.rs +++ b/crates/fff-core/src/grep.rs @@ -1633,6 +1633,7 @@ fn fuzzy_grep_search<'a>( max_typos: Some(max_typos as u16), sort: false, scoring, + ..Default::default() }, ); @@ -2363,6 +2364,7 @@ mod tests { exact_match_bonus: 100, ..neo_frizbee::Scoring::default() }, + ..Default::default() }; let min_matched = needle.len().saturating_sub(1).max(1); // 5 let max_match_span = needle.len() + 4; // 10 diff --git a/crates/fff-core/src/score.rs b/crates/fff-core/src/score.rs index 02faead41..f757f4816 100644 --- a/crates/fff-core/src/score.rs +++ b/crates/fff-core/src/score.rs @@ -313,6 +313,7 @@ pub(crate) fn fuzzy_match_and_score_dirs<'a>( matching_case_bonus: if has_uppercase { 4 } else { 0 }, ..Default::default() }, + ..Default::default() }; let path_matches = match_fuzzy_parts_dirs( @@ -509,6 +510,7 @@ fn match_and_score_in_arena<'a>( matching_case_bonus: if has_uppercase { 4 } else { 0 }, ..Default::default() }, + ..Default::default() }; let path_matches = match_fuzzy_parts( diff --git a/crates/fff-nvim/benches/fuzzy_search_bench.rs b/crates/fff-nvim/benches/fuzzy_search_bench.rs index 8a1fcd57d..e0ccfee18 100644 --- a/crates/fff-nvim/benches/fuzzy_search_bench.rs +++ b/crates/fff-nvim/benches/fuzzy_search_bench.rs @@ -8,7 +8,6 @@ use fff::{ use std::path::PathBuf; use std::time::Duration; -/// Initialize tracing to output to console fn init_tracing() { // use tracing_subscriber::EnvFilter; // use tracing_subscriber::fmt; @@ -22,7 +21,6 @@ fn init_tracing() { // .try_init(); } -/// Initialize FilePicker using shared state fn init_file_picker_internal( path: &str, shared_picker: &SharedFilePicker, @@ -41,7 +39,6 @@ fn init_file_picker_internal( .map_err(|e| format!("Failed to create FilePicker: {:?}", e)) } -/// Helper function to wait for scanning to complete and get file count fn wait_for_scan_completion( shared_picker: &SharedFilePicker, timeout_secs: u64, @@ -100,20 +97,10 @@ fn wait_for_scan_completion( )); } - std::thread::sleep(Duration::from_millis(100)); + std::thread::sleep(Duration::from_millis(50)); } } -/// Clean up shared state -fn cleanup_shared_state(shared_picker: &SharedFilePicker) { - if let Ok(mut picker_guard) = shared_picker.write() { - if let Some(mut picker) = picker_guard.take() { - picker.stop_background_monitor(); - } - } -} - -/// Initialize FilePicker once and return shared state fn setup_once() -> Result<(SharedFilePicker, SharedFrecency), String> { init_tracing(); @@ -145,7 +132,6 @@ fn setup_once() -> Result<(SharedFilePicker, SharedFrecency), String> { Ok((shared_picker, shared_frecency)) } -/// Benchmark for searching with various query patterns fn bench_search_queries(c: &mut Criterion) { let (sp, _sf) = match setup_once() { Ok(result) => result,