mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-09-23 14:12:32 +00:00
fix CI clippy 1.80
warnings (#1357)
This commit is contained in:
parent
6c64d43e1b
commit
547d82f07d
2 changed files with 5 additions and 5 deletions
|
@ -20,7 +20,7 @@
|
||||||
//! As a matter of fact, most of these keywords are not used at all
|
//! As a matter of fact, most of these keywords are not used at all
|
||||||
//! and could be removed.
|
//! and could be removed.
|
||||||
//! 3) a `RESERVED_FOR_TABLE_ALIAS` array with keywords reserved in a
|
//! 3) a `RESERVED_FOR_TABLE_ALIAS` array with keywords reserved in a
|
||||||
//! "table alias" context.
|
//! "table alias" context.
|
||||||
|
|
||||||
#[cfg(feature = "serde")]
|
#[cfg(feature = "serde")]
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
|
@ -111,10 +111,10 @@ impl TestedDialects {
|
||||||
/// that:
|
/// that:
|
||||||
///
|
///
|
||||||
/// 1. parsing `sql` results in the same [`Statement`] as parsing
|
/// 1. parsing `sql` results in the same [`Statement`] as parsing
|
||||||
/// `canonical`.
|
/// `canonical`.
|
||||||
///
|
///
|
||||||
/// 2. re-serializing the result of parsing `sql` produces the same
|
/// 2. re-serializing the result of parsing `sql` produces the same
|
||||||
/// `canonical` sql string
|
/// `canonical` sql string
|
||||||
pub fn one_statement_parses_to(&self, sql: &str, canonical: &str) -> Statement {
|
pub fn one_statement_parses_to(&self, sql: &str, canonical: &str) -> Statement {
|
||||||
let mut statements = self.parse_sql_statements(sql).expect(sql);
|
let mut statements = self.parse_sql_statements(sql).expect(sql);
|
||||||
assert_eq!(statements.len(), 1);
|
assert_eq!(statements.len(), 1);
|
||||||
|
@ -180,10 +180,10 @@ impl TestedDialects {
|
||||||
/// Ensures that `sql` parses as a single [`Select`], and that additionally:
|
/// Ensures that `sql` parses as a single [`Select`], and that additionally:
|
||||||
///
|
///
|
||||||
/// 1. parsing `sql` results in the same [`Statement`] as parsing
|
/// 1. parsing `sql` results in the same [`Statement`] as parsing
|
||||||
/// `canonical`.
|
/// `canonical`.
|
||||||
///
|
///
|
||||||
/// 2. re-serializing the result of parsing `sql` produces the same
|
/// 2. re-serializing the result of parsing `sql` produces the same
|
||||||
/// `canonical` sql string
|
/// `canonical` sql string
|
||||||
pub fn verified_only_select_with_canonical(&self, query: &str, canonical: &str) -> Select {
|
pub fn verified_only_select_with_canonical(&self, query: &str, canonical: &str) -> Select {
|
||||||
let q = match self.one_statement_parses_to(query, canonical) {
|
let q = match self.one_statement_parses_to(query, canonical) {
|
||||||
Statement::Query(query) => *query,
|
Statement::Query(query) => *query,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue