Clean up nightly clippy lints (#1158)

This commit is contained in:
Andrew Lamb 2024-02-29 14:56:36 -05:00 committed by GitHub
parent e2ce324722
commit 10cc54e10e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 10 additions and 8 deletions

View file

@ -5219,7 +5219,13 @@ impl fmt::Display for CopyLegacyCsvOption {
}
}
/// `MERGE` Statement
///
/// ```sql
/// MERGE INTO <target_table> USING <source> ON <join_expr> { matchedClause | notMatchedClause } [ ... ]
/// ```
///
/// See [Snowflake documentation](https://docs.snowflake.com/en/sql-reference/sql/merge)
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]

View file

@ -207,8 +207,6 @@ pub fn dialect_from_str(dialect_name: impl AsRef<str>) -> Option<Box<dyn Dialect
#[cfg(test)]
mod tests {
use super::ansi::AnsiDialect;
use super::generic::GenericDialect;
use super::*;
struct DialectHolder<'a> {

View file

@ -30,7 +30,7 @@ use IsOptional::*;
use crate::ast::helpers::stmt_create_table::{BigQueryTableConfiguration, CreateTableBuilder};
use crate::ast::*;
use crate::dialect::*;
use crate::keywords::{self, Keyword, ALL_KEYWORDS};
use crate::keywords::{Keyword, ALL_KEYWORDS};
use crate::tokenizer::*;
mod alter;

View file

@ -1506,7 +1506,7 @@ impl<'a: 'b, 'b> Unescape<'a, 'b> {
#[cfg(test)]
mod tests {
use super::*;
use crate::dialect::{ClickHouseDialect, GenericDialect, MsSqlDialect};
use crate::dialect::{ClickHouseDialect, MsSqlDialect};
#[test]
fn tokenizer_error_impl() {

View file

@ -19,7 +19,6 @@ mod test_utils;
use test_utils::*;
use sqlparser::ast::Expr::{BinaryOp, Identifier, MapAccess};
use sqlparser::ast::Ident;
use sqlparser::ast::SelectItem::UnnamedExpr;
use sqlparser::ast::TableFactor::Table;
use sqlparser::ast::*;

View file

@ -15,9 +15,8 @@
//! is also tested (on the inputs it can handle).
use matches::assert_matches;
use sqlparser::ast::Expr;
use sqlparser::ast::MysqlInsertPriority::{Delayed, HighPriority, LowPriority};
use sqlparser::ast::Value;
use sqlparser::ast::*;
use sqlparser::dialect::{GenericDialect, MySqlDialect};
use sqlparser::parser::ParserOptions;

View file

@ -1305,7 +1305,7 @@ fn test_snowflake_stage_object_names() {
"@namespace.stage_name/path",
"@~/path",
];
let mut allowed_object_names = vec![
let mut allowed_object_names = [
ObjectName(vec![Ident::new("my_company"), Ident::new("emp_basic")]),
ObjectName(vec![Ident::new("@namespace"), Ident::new("%table_name")]),
ObjectName(vec![