File tree 4 files changed +5
-7
lines changed 4 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 1
- rust 1.73 .0
1
+ rust 1.75 .0
Original file line number Diff line number Diff line change @@ -349,6 +349,7 @@ mod tests {
349
349
}
350
350
}
351
351
352
+ #[ allow( clippy:: needless_raw_string_hashes) ]
352
353
let statement = r#"SELECT 'Wayne\'s World'"# ;
353
354
let res1 = Parser :: parse_sql ( & MySqlDialect { } , statement) ;
354
355
let res2 = Parser :: parse_sql ( & WrappedDialect ( MySqlDialect { } ) , statement) ;
Original file line number Diff line number Diff line change @@ -727,10 +727,7 @@ impl<'a> Tokenizer<'a> {
727
727
// match binary literal that starts with 0x
728
728
if s == "0" && chars. peek ( ) == Some ( & 'x' ) {
729
729
chars. next ( ) ;
730
- let s2 = peeking_take_while (
731
- chars,
732
- |ch| matches ! ( ch, '0' ..='9' | 'A' ..='F' | 'a' ..='f' ) ,
733
- ) ;
730
+ let s2 = peeking_take_while ( chars, |ch| ch. is_ascii_hexdigit ( ) ) ;
734
731
return Ok ( Some ( Token :: HexStringLiteral ( s2) ) ) ;
735
732
}
736
733
@@ -1077,7 +1074,7 @@ impl<'a> Tokenizer<'a> {
1077
1074
match chars. peek ( ) {
1078
1075
Some ( '$' ) => {
1079
1076
chars. next ( ) ;
1080
- for ( _ , c ) in value. chars ( ) . enumerate ( ) {
1077
+ for c in value. chars ( ) {
1081
1078
let next_char = chars. next ( ) ;
1082
1079
if Some ( c) != next_char {
1083
1080
return self . tokenizer_error (
Original file line number Diff line number Diff line change @@ -3277,7 +3277,7 @@ fn parse_dollar_quoted_string() {
3277
3277
3278
3278
let stmt = pg ( ) . parse_sql_statements ( sql) . unwrap ( ) ;
3279
3279
3280
- let projection = match stmt. get ( 0 ) . unwrap ( ) {
3280
+ let projection = match stmt. first ( ) . unwrap ( ) {
3281
3281
Statement :: Query ( query) => match & * query. body {
3282
3282
SetExpr :: Select ( select) => & select. projection ,
3283
3283
_ => unreachable ! ( ) ,
You can’t perform that action at this time.
0 commit comments