Skip to content

Clean up nightly clippy lints #1158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/ast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5200,7 +5200,13 @@ impl fmt::Display for CopyLegacyCsvOption {
}
}

/// `MERGE` Statement
///
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clippy flags empty doc comments now

/// ```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))]
Expand Down
2 changes: 0 additions & 2 deletions src/dialect/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
2 changes: 1 addition & 1 deletion src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/tokenizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1409,7 +1409,7 @@ fn peeking_take_while(chars: &mut State, mut predicate: impl FnMut(char) -> bool
#[cfg(test)]
mod tests {
use super::*;
use crate::dialect::{ClickHouseDialect, GenericDialect, MsSqlDialect};
use crate::dialect::{ClickHouseDialect, MsSqlDialect};

#[test]
fn tokenizer_error_impl() {
Expand Down
1 change: 0 additions & 1 deletion tests/sqlparser_clickhouse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down
3 changes: 1 addition & 2 deletions tests/sqlparser_mysql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/sqlparser_snowflake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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![
Expand Down