@@ -303,7 +303,7 @@ impl TestCompletionsCase {
303303 let part_without_parens = if starts_with_paren || ends_with_paren {
304304 // we only want to sanitize when the token either starts or ends; that helps
305305 // catch end tokens like `('something');`
306- part_without_comments. replace ( '(' , "" ) . replace ( ')' , "" )
306+ part_without_comments. replace ( [ '(' , ')' ] , "" )
307307 } else {
308308 part_without_comments. to_string ( )
309309 } ;
@@ -313,7 +313,7 @@ impl TestCompletionsCase {
313313
314314 let part_without_quotes = part_without_parens. replace ( '"' , "" ) ;
315315
316- if pre_sql. len ( ) > 0 {
316+ if ! pre_sql. is_empty ( ) {
317317 let query = format ! (
318318 "{}{}{}{}{}" ,
319319 pre_sql,
@@ -326,7 +326,7 @@ impl TestCompletionsCase {
326326 self . completions_snapshot (
327327 query. into ( ) ,
328328 & mut snapshot_result,
329- & schema_cache,
329+ schema_cache,
330330 parser,
331331 comment,
332332 )
@@ -346,7 +346,7 @@ impl TestCompletionsCase {
346346 self . completions_snapshot (
347347 query1. into ( ) ,
348348 & mut snapshot_result,
349- & schema_cache,
349+ schema_cache,
350350 parser,
351351 comment,
352352 )
@@ -363,13 +363,13 @@ impl TestCompletionsCase {
363363 self . completions_snapshot (
364364 query2. into ( ) ,
365365 & mut snapshot_result,
366- & schema_cache,
366+ schema_cache,
367367 parser,
368368 comment,
369369 )
370370 . await ;
371371
372- pre_sql. push_str ( "(" ) ;
372+ pre_sql. push ( '(' ) ;
373373 should_close_with_paren = true ;
374374 }
375375
@@ -387,7 +387,7 @@ impl TestCompletionsCase {
387387 self . completions_snapshot (
388388 query1. into ( ) ,
389389 & mut snapshot_result,
390- & schema_cache,
390+ schema_cache,
391391 parser,
392392 comment,
393393 )
@@ -405,7 +405,7 @@ impl TestCompletionsCase {
405405 self . completions_snapshot (
406406 query2. into ( ) ,
407407 & mut snapshot_result,
408- & schema_cache,
408+ schema_cache,
409409 parser,
410410 comment,
411411 )
@@ -432,7 +432,7 @@ impl TestCompletionsCase {
432432 self . completions_snapshot (
433433 query. into ( ) ,
434434 & mut snapshot_result,
435- & schema_cache,
435+ schema_cache,
436436 parser,
437437 if comment_indicator
438438 . is_some_and ( |txt| og_part. starts_with ( txt. as_str ( ) ) )
@@ -461,7 +461,7 @@ impl TestCompletionsCase {
461461 self . completions_snapshot (
462462 query. into ( ) ,
463463 & mut snapshot_result,
464- & schema_cache,
464+ schema_cache,
465465 parser,
466466 None ,
467467 )
@@ -471,27 +471,27 @@ impl TestCompletionsCase {
471471 pre_sql. push_str ( & part_without_parens) ;
472472
473473 if dot_idx < dot_count {
474- pre_sql. push_str ( "." ) ;
474+ pre_sql. push ( '.' ) ;
475475 }
476476
477477 if ends_with_paren {
478478 should_close_with_paren = false ;
479- pre_sql. push_str ( ")" ) ;
479+ pre_sql. push ( ')' ) ;
480480 }
481481 }
482482
483483 if whitespace_idx < whitespace_count {
484484 // note: we're sanitizing the white_space of typed SQL to simple spaces.
485- pre_sql. push_str ( " " ) ;
485+ pre_sql. push ( ' ' ) ;
486486 }
487487 }
488488
489- pre_sql. push_str ( " \n " ) ;
489+ pre_sql. push ( '\n' ) ;
490490 }
491491
492492 ChunkToType :: WithoutCompletions ( sql) => {
493493 pre_sql. push_str ( sql. as_str ( ) ) ;
494- pre_sql. push_str ( " \n " ) ;
494+ pre_sql. push ( '\n' ) ;
495495 }
496496 }
497497 }
@@ -526,12 +526,12 @@ impl TestCompletionsCase {
526526 let diff = pos - sql. len ( ) ;
527527
528528 sql. push_str ( & " " . repeat ( diff) ) ;
529- sql. push_str ( "|" ) ;
529+ sql. push ( '|' ) ;
530530 }
531531 writeln ! ( writer, "{sql}" ) . unwrap ( ) ;
532532
533533 if let Some ( c) = comment {
534- writeln ! ( writer, "**{}**" , c ) . unwrap ( ) ;
534+ writeln ! ( writer, "**{c }**" ) . unwrap ( ) ;
535535 }
536536
537537 if !items. is_empty ( ) {
0 commit comments