@@ -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
0 commit comments