@@ -13,7 +13,7 @@ fn get_ck_binary() -> PathBuf {
1313
1414 // Ensure binary exists by building it
1515 let output = Command :: new ( "cargo" )
16- . args ( & [ "build" , "--bin" , "ck" ] )
16+ . args ( [ "build" , "--bin" , "ck" ] )
1717 . output ( )
1818 . expect ( "Failed to build ck binary" ) ;
1919
@@ -50,7 +50,7 @@ fn test_basic_grep_functionality() {
5050
5151 // Test basic regex search
5252 let output = Command :: new ( get_ck_binary ( ) )
53- . args ( & [ "rust" , temp_dir. path ( ) . to_str ( ) . unwrap ( ) ] )
53+ . args ( [ "rust" , temp_dir. path ( ) . to_str ( ) . unwrap ( ) ] )
5454 . output ( )
5555 . expect ( "Failed to run ck" ) ;
5656
@@ -70,7 +70,7 @@ fn test_case_insensitive_search() {
7070 . unwrap ( ) ;
7171
7272 let output = Command :: new ( get_ck_binary ( ) )
73- . args ( & [ "-i" , "HELLO" , temp_dir. path ( ) . to_str ( ) . unwrap ( ) ] )
73+ . args ( [ "-i" , "HELLO" , temp_dir. path ( ) . to_str ( ) . unwrap ( ) ] )
7474 . output ( )
7575 . expect ( "Failed to run ck" ) ;
7676
@@ -92,7 +92,7 @@ fn test_recursive_search() {
9292 . unwrap ( ) ;
9393
9494 let output = Command :: new ( get_ck_binary ( ) )
95- . args ( & [ "-r" , "target" , temp_dir. path ( ) . to_str ( ) . unwrap ( ) ] )
95+ . args ( [ "-r" , "target" , temp_dir. path ( ) . to_str ( ) . unwrap ( ) ] )
9696 . output ( )
9797 . expect ( "Failed to run ck" ) ;
9898
@@ -108,7 +108,7 @@ fn test_json_output() {
108108 fs:: write ( temp_dir. path ( ) . join ( "test.txt" ) , "json test line" ) . unwrap ( ) ;
109109
110110 let output = Command :: new ( get_ck_binary ( ) )
111- . args ( & [ "--json" , "json" , temp_dir. path ( ) . to_str ( ) . unwrap ( ) ] )
111+ . args ( [ "--json" , "json" , temp_dir. path ( ) . to_str ( ) . unwrap ( ) ] )
112112 . output ( )
113113 . expect ( "Failed to run ck" ) ;
114114
@@ -129,7 +129,7 @@ fn test_index_command() {
129129
130130 // Test index creation
131131 let output = Command :: new ( get_ck_binary ( ) )
132- . args ( & [ "--index" , "." ] )
132+ . args ( [ "--index" , "." ] )
133133 . current_dir ( temp_dir. path ( ) )
134134 . output ( )
135135 . expect ( "Failed to run ck index" ) ;
@@ -171,7 +171,7 @@ fn test_semantic_search() {
171171
172172 // First create an index
173173 let output = Command :: new ( get_ck_binary ( ) )
174- . args ( & [ "--index" , "." ] )
174+ . args ( [ "--index" , "." ] )
175175 . current_dir ( temp_dir. path ( ) )
176176 . output ( )
177177 . expect ( "Failed to run ck index" ) ;
@@ -180,7 +180,7 @@ fn test_semantic_search() {
180180
181181 // Test semantic search - should rank AI content higher for "neural networks"
182182 let output = Command :: new ( get_ck_binary ( ) )
183- . args ( & [ "--sem" , "neural networks" , "." ] )
183+ . args ( [ "--sem" , "neural networks" , "." ] )
184184 . current_dir ( temp_dir. path ( ) )
185185 . output ( )
186186 . expect ( "Failed to run ck semantic search" ) ;
@@ -217,7 +217,7 @@ fn test_lexical_search() {
217217
218218 // Create index
219219 let output = Command :: new ( get_ck_binary ( ) )
220- . args ( & [ "--index" , "." ] )
220+ . args ( [ "--index" , "." ] )
221221 . current_dir ( temp_dir. path ( ) )
222222 . output ( )
223223 . expect ( "Failed to run ck index" ) ;
@@ -226,7 +226,7 @@ fn test_lexical_search() {
226226
227227 // Test lexical search
228228 let output = Command :: new ( get_ck_binary ( ) )
229- . args ( & [ "--lex" , "machine learning" , "." ] )
229+ . args ( [ "--lex" , "machine learning" , "." ] )
230230 . current_dir ( temp_dir. path ( ) )
231231 . output ( )
232232 . expect ( "Failed to run ck lexical search" ) ;
@@ -248,7 +248,7 @@ fn test_hybrid_search() {
248248
249249 // Create index
250250 let output = Command :: new ( get_ck_binary ( ) )
251- . args ( & [ "--index" , "." ] )
251+ . args ( [ "--index" , "." ] )
252252 . current_dir ( temp_dir. path ( ) )
253253 . output ( )
254254 . expect ( "Failed to run ck index" ) ;
@@ -257,7 +257,7 @@ fn test_hybrid_search() {
257257
258258 // Test hybrid search
259259 let output = Command :: new ( get_ck_binary ( ) )
260- . args ( & [ "--hybrid" , "Python" , "." ] )
260+ . args ( [ "--hybrid" , "Python" , "." ] )
261261 . current_dir ( temp_dir. path ( ) )
262262 . output ( )
263263 . expect ( "Failed to run ck hybrid search" ) ;
@@ -278,7 +278,7 @@ fn test_context_lines() {
278278 . unwrap ( ) ;
279279
280280 let output = Command :: new ( get_ck_binary ( ) )
281- . args ( & [ "-C" , "1" , "target" , temp_dir. path ( ) . to_str ( ) . unwrap ( ) ] )
281+ . args ( [ "-C" , "1" , "target" , temp_dir. path ( ) . to_str ( ) . unwrap ( ) ] )
282282 . output ( )
283283 . expect ( "Failed to run ck with context" ) ;
284284
@@ -305,7 +305,7 @@ fn test_topk_limit() {
305305 }
306306
307307 let output = Command :: new ( get_ck_binary ( ) )
308- . args ( & [ "--topk" , "5" , "match" , temp_dir. path ( ) . to_str ( ) . unwrap ( ) ] )
308+ . args ( [ "--topk" , "5" , "match" , temp_dir. path ( ) . to_str ( ) . unwrap ( ) ] )
309309 . output ( )
310310 . expect ( "Failed to run ck with topk" ) ;
311311
@@ -325,7 +325,7 @@ fn test_line_numbers() {
325325 . unwrap ( ) ;
326326
327327 let output = Command :: new ( get_ck_binary ( ) )
328- . args ( & [ "-n" , "matched" , temp_dir. path ( ) . to_str ( ) . unwrap ( ) ] )
328+ . args ( [ "-n" , "matched" , temp_dir. path ( ) . to_str ( ) . unwrap ( ) ] )
329329 . output ( )
330330 . expect ( "Failed to run ck with line numbers" ) ;
331331
@@ -343,7 +343,7 @@ fn test_clean_command() {
343343
344344 // Create index first
345345 let output = Command :: new ( get_ck_binary ( ) )
346- . args ( & [ "--index" , "." ] )
346+ . args ( [ "--index" , "." ] )
347347 . current_dir ( temp_dir. path ( ) )
348348 . output ( )
349349 . expect ( "Failed to run ck index" ) ;
@@ -360,7 +360,7 @@ fn test_clean_command() {
360360
361361 // Clean index
362362 let output = Command :: new ( get_ck_binary ( ) )
363- . args ( & [ "--clean" , "." ] )
363+ . args ( [ "--clean" , "." ] )
364364 . current_dir ( temp_dir. path ( ) )
365365 . output ( )
366366 . expect ( "Failed to run ck clean" ) ;
@@ -383,7 +383,7 @@ fn test_no_matches_stderr_message() {
383383
384384 // Search for pattern that won't match
385385 let output = Command :: new ( get_ck_binary ( ) )
386- . args ( & [ "nonexistent_pattern" , temp_dir. path ( ) . to_str ( ) . unwrap ( ) ] )
386+ . args ( [ "nonexistent_pattern" , temp_dir. path ( ) . to_str ( ) . unwrap ( ) ] )
387387 . output ( )
388388 . expect ( "Failed to run ck" ) ;
389389
@@ -403,7 +403,7 @@ fn test_no_matches_stderr_message() {
403403#[ test]
404404fn test_nonexistent_directory_error ( ) {
405405 let output = Command :: new ( get_ck_binary ( ) )
406- . args ( & [ "--sem" , "test" , "/nonexistent/directory" ] )
406+ . args ( [ "--sem" , "test" , "/nonexistent/directory" ] )
407407 . output ( )
408408 . expect ( "Failed to run ck" ) ;
409409
@@ -418,7 +418,7 @@ fn test_nonexistent_directory_error() {
418418fn test_error_handling ( ) {
419419 // Test with nonexistent directory
420420 let _output = Command :: new ( get_ck_binary ( ) )
421- . args ( & [ "test" , "/nonexistent/directory" ] )
421+ . args ( [ "test" , "/nonexistent/directory" ] )
422422 . output ( )
423423 . expect ( "Failed to run ck" ) ;
424424
@@ -430,7 +430,7 @@ fn test_error_handling() {
430430 fs:: write ( temp_dir. path ( ) . join ( "test.txt" ) , "test content" ) . unwrap ( ) ;
431431
432432 let output = Command :: new ( get_ck_binary ( ) )
433- . args ( & [ "[invalid" , temp_dir. path ( ) . to_str ( ) . unwrap ( ) ] )
433+ . args ( [ "[invalid" , temp_dir. path ( ) . to_str ( ) . unwrap ( ) ] )
434434 . output ( )
435435 . expect ( "Failed to run ck" ) ;
436436
0 commit comments