Skip to content

Commit 33c4bba

Browse files
author
Daniel Schatz
committed
removed warnings
1 parent 5673553 commit 33c4bba

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

src-tauri/src/search_engine/art_v4.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@ impl ART {
961961
// No matching child - create a new one
962962
node_ref.add_child(c, None);
963963
}
964-
964+
965965
// Process the child (need to handle the case where node might grow)
966966
if let Some(child) = node_ref.find_child_mut(c) {
967967
let taken_child = child.take();
@@ -1025,7 +1025,7 @@ impl ART {
10251025

10261026
Some((current, depth))
10271027
}
1028-
1028+
10291029
// Rewritten to use an iterative approach to prevent stack overflow
10301030
fn collect_all_paths(&self, node: &ARTNode, results: &mut Vec<(String, f32)>) {
10311031
let mut stack = Vec::new();
@@ -2314,7 +2314,7 @@ mod tests_art_v4 {
23142314

23152315
// Track unique normalized paths for accurate verification
23162316
let mut unique_normalized_paths = std::collections::HashSet::new();
2317-
let mut temp_art = ART::new(1); // Temporary ART for normalization
2317+
let temp_art = ART::new(1); // Temporary ART for normalization
23182318

23192319
for (i, path) in all_paths.iter().enumerate() {
23202320
// Use varying scores based on position
@@ -2348,9 +2348,6 @@ mod tests_art_v4 {
23482348
// Verify the final count matches expectation (accounting for duplicates)
23492349
log_info!(&format!("Expected unique paths: {}, Actual in trie: {}",
23502350
unique_normalized_paths.len(), trie.len()));
2351-
2352-
// 3. Generate guaranteed-to-match test queries
2353-
let mut test_queries = Vec::new();
23542351

23552352
// Create a function to generate a diverse set of queries that will have matches
23562353
fn extract_guaranteed_queries(paths: &[String], limit: usize) -> Vec<String> {
@@ -2496,7 +2493,7 @@ mod tests_art_v4 {
24962493
}
24972494

24982495
// Use our function to generate guaranteed-to-match queries
2499-
test_queries = extract_guaranteed_queries(&all_paths, 15);
2496+
let test_queries = extract_guaranteed_queries(&all_paths, 15);
25002497

25012498
log_info!(&format!("Generated {} guaranteed-to-match queries", test_queries.len()));
25022499

src-tauri/src/search_engine/autocomplete_engine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1510,7 +1510,7 @@ mod tests_autocomplete_engine {
15101510

15111511
// Now do a second search to test cache
15121512
let cache_start = std::time::Instant::now();
1513-
let cached_results = subset_engine.search(query);
1513+
let _cached_results = subset_engine.search(query);
15141514
let cache_time = cache_start.elapsed();
15151515

15161516
// If cache time is significantly faster, count as a cache hit

0 commit comments

Comments
 (0)