Fix Rust 1.72 clippy lints (#957)

This commit is contained in:
Andrew Lamb 2023-08-25 12:21:31 -04:00 committed by GitHub
parent 4a2fa66b55
commit 14da37d182
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 22 deletions

View file

@ -634,11 +634,11 @@ fn parse_escaped_backticks_with_no_escape() {
#[test]
fn parse_unterminated_escape() {
let sql = r#"SELECT 'I\'m not fine\'"#;
let sql = r"SELECT 'I\'m not fine\'";
let result = std::panic::catch_unwind(|| mysql().one_statement_parses_to(sql, ""));
assert!(result.is_err());
let sql = r#"SELECT 'I\\'m not fine'"#;
let sql = r"SELECT 'I\\'m not fine'";
let result = std::panic::catch_unwind(|| mysql().one_statement_parses_to(sql, ""));
assert!(result.is_err());
}
@ -666,7 +666,7 @@ fn parse_escaped_string_with_escape() {
_ => unreachable!(),
};
}
let sql = r#"SELECT 'I\'m fine'"#;
let sql = r"SELECT 'I\'m fine'";
assert_mysql_query_value(sql, "I'm fine");
let sql = r#"SELECT 'I''m fine'"#;
@ -675,7 +675,7 @@ fn parse_escaped_string_with_escape() {
let sql = r#"SELECT 'I\"m fine'"#;
assert_mysql_query_value(sql, "I\"m fine");
let sql = r#"SELECT 'Testing: \0 \\ \% \_ \b \n \r \t \Z \a \ '"#;
let sql = r"SELECT 'Testing: \0 \\ \% \_ \b \n \r \t \Z \a \ '";
assert_mysql_query_value(sql, "Testing: \0 \\ % _ \u{8} \n \r \t \u{1a} a ");
}
@ -702,8 +702,8 @@ fn parse_escaped_string_with_no_escape() {
_ => unreachable!(),
};
}
let sql = r#"SELECT 'I\'m fine'"#;
assert_mysql_query_value(sql, r#"I\'m fine"#);
let sql = r"SELECT 'I\'m fine'";
assert_mysql_query_value(sql, r"I\'m fine");
let sql = r#"SELECT 'I''m fine'"#;
assert_mysql_query_value(sql, r#"I''m fine"#);
@ -711,8 +711,8 @@ fn parse_escaped_string_with_no_escape() {
let sql = r#"SELECT 'I\"m fine'"#;
assert_mysql_query_value(sql, r#"I\"m fine"#);
let sql = r#"SELECT 'Testing: \0 \\ \% \_ \b \n \r \t \Z \a \ '"#;
assert_mysql_query_value(sql, r#"Testing: \0 \\ \% \_ \b \n \r \t \Z \a \ "#);
let sql = r"SELECT 'Testing: \0 \\ \% \_ \b \n \r \t \Z \a \ '";
assert_mysql_query_value(sql, r"Testing: \0 \\ \% \_ \b \n \r \t \Z \a \ ");
}
#[test]
@ -723,7 +723,7 @@ fn check_roundtrip_of_escaped_string() {
dialects: vec![Box::new(MySqlDialect {})],
options: options.clone(),
}
.verified_stmt(r#"SELECT 'I\'m fine'"#);
.verified_stmt(r"SELECT 'I\'m fine'");
TestedDialects {
dialects: vec![Box::new(MySqlDialect {})],
options: options.clone(),
@ -733,12 +733,12 @@ fn check_roundtrip_of_escaped_string() {
dialects: vec![Box::new(MySqlDialect {})],
options: options.clone(),
}
.verified_stmt(r#"SELECT 'I\\\'m fine'"#);
.verified_stmt(r"SELECT 'I\\\'m fine'");
TestedDialects {
dialects: vec![Box::new(MySqlDialect {})],
options: options.clone(),
}
.verified_stmt(r#"SELECT 'I\\\'m fine'"#);
.verified_stmt(r"SELECT 'I\\\'m fine'");
TestedDialects {
dialects: vec![Box::new(MySqlDialect {})],