@@ -1010,9 +1010,9 @@ fn parse_inner<T: ColumnType>(loc: &Location, script: &str) -> Result<Vec<Record
10101010 }
10111011
10121012 // Find the matching ')'
1013- let close_paren = rest_str. find ( ')' ) . ok_or_else ( || {
1014- ParseErrorKind :: InvalidLine ( line . into ( ) ) . at ( loc . clone ( ) )
1015- } ) ?;
1013+ let close_paren = rest_str
1014+ . find ( ')' )
1015+ . ok_or_else ( || ParseErrorKind :: InvalidLine ( line . into ( ) ) . at ( loc . clone ( ) ) ) ?;
10161016
10171017 // Extract variable names between parentheses
10181018 let vars_str = & rest_str[ 1 ..close_paren] ;
@@ -1036,9 +1036,7 @@ fn parse_inner<T: ColumnType>(loc: &Location, script: &str) -> Result<Vec<Record
10361036 // Check if there's extra content after ')'
10371037 let after_paren = rest_str[ close_paren + 1 ..] . trim ( ) ;
10381038 if !after_paren. is_empty ( ) {
1039- return Err (
1040- ParseErrorKind :: UnexpectedToken ( after_paren. to_string ( ) ) . at ( loc)
1041- ) ;
1039+ return Err ( ParseErrorKind :: UnexpectedToken ( after_paren. to_string ( ) ) . at ( loc) ) ;
10421040 }
10431041
10441042 // Parse the SQL body (following lines until empty line)
@@ -1491,9 +1489,7 @@ SELECT 1
14911489 let records = parse :: < DefaultColumnType > ( script) . unwrap ( ) ;
14921490 assert_eq ! ( records. len( ) , 1 ) ;
14931491 match & records[ 0 ] {
1494- Record :: Let {
1495- variables, sql, ..
1496- } => {
1492+ Record :: Let { variables, sql, .. } => {
14971493 assert_eq ! ( variables, & [ "id" . to_string( ) ] ) ;
14981494 assert_eq ! ( sql, "SELECT 1" ) ;
14991495 }
@@ -1510,9 +1506,7 @@ SELECT 1, 'hello', 42
15101506 let records = parse :: < DefaultColumnType > ( script) . unwrap ( ) ;
15111507 assert_eq ! ( records. len( ) , 1 ) ;
15121508 match & records[ 0 ] {
1513- Record :: Let {
1514- variables, sql, ..
1515- } => {
1509+ Record :: Let { variables, sql, .. } => {
15161510 assert_eq ! (
15171511 variables,
15181512 & [ "id" . to_string( ) , "name" . to_string( ) , "value" . to_string( ) ]
@@ -1580,10 +1574,7 @@ let (123invalid)
15801574SELECT 1
15811575" ;
15821576 let err = parse :: < DefaultColumnType > ( script) . unwrap_err ( ) ;
1583- assert ! ( matches!(
1584- err. kind( ) ,
1585- ParseErrorKind :: InvalidVariableName ( _)
1586- ) ) ;
1577+ assert ! ( matches!( err. kind( ) , ParseErrorKind :: InvalidVariableName ( _) ) ) ;
15871578 }
15881579
15891580 #[ test]
0 commit comments