mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-06 17:54:20 +01:00
chore: fix clippy warnings
This commit is contained in:
@@ -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)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user