chore: fix clippy warnings

This commit is contained in:
Nils Koch
2025-06-13 21:20:26 +01:00
parent 1a0d4f500f
commit 2827b86917
95 changed files with 902 additions and 992 deletions

View File

@@ -26,7 +26,7 @@ impl ToSqlString for ast::Stmt {
if let Some(name) = name {
format!("ANALYZE {};", name.to_sql_string(context))
} else {
format!("ANALYZE;")
"ANALYZE;".to_string()
}
}
Self::Attach {
@@ -211,15 +211,15 @@ mod tests {
($test_name:ident, $input:expr) => {
#[test]
fn $test_name() {
let context = crate::to_sql_string::stmt::tests::TestContext;
let context = $crate::to_sql_string::stmt::tests::TestContext;
let input = $input.split_whitespace().collect::<Vec<&str>>().join(" ");
let mut parser = crate::lexer::sql::Parser::new(input.as_bytes());
let mut parser = $crate::lexer::sql::Parser::new(input.as_bytes());
let cmd = fallible_iterator::FallibleIterator::next(&mut parser)
.unwrap()
.unwrap();
assert_eq!(
input,
crate::to_sql_string::ToSqlString::to_sql_string(cmd.stmt(), &context)
$crate::to_sql_string::ToSqlString::to_sql_string(cmd.stmt(), &context)
);
}
};
@@ -227,15 +227,15 @@ mod tests {
#[test]
$(#[$attribute])*
fn $test_name() {
let context = crate::to_sql_string::stmt::tests::TestContext;
let context = $crate::to_sql_string::stmt::tests::TestContext;
let input = $input.split_whitespace().collect::<Vec<&str>>().join(" ");
let mut parser = crate::lexer::sql::Parser::new(input.as_bytes());
let mut parser = $crate::lexer::sql::Parser::new(input.as_bytes());
let cmd = fallible_iterator::FallibleIterator::next(&mut parser)
.unwrap()
.unwrap();
assert_eq!(
input,
crate::to_sql_string::ToSqlString::to_sql_string(cmd.stmt(), &context)
$crate::to_sql_string::ToSqlString::to_sql_string(cmd.stmt(), &context)
);
}
}