Make clippy happy (#330)

Signed-off-by: koushiro <koushiro.cqx@gmail.com>
This commit is contained in:
Qinxuan Chen 2021-08-20 05:02:15 +08:00 committed by GitHub
parent e5991f3ae5
commit 67e17b27f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 56 additions and 43 deletions

View file

@ -16,15 +16,16 @@
//!
//! The tokens then form the input for the parser, which outputs an Abstract Syntax Tree (AST).
use std::fmt;
use std::iter::Peekable;
use std::str::Chars;
use super::dialect::keywords::{Keyword, ALL_KEYWORDS, ALL_KEYWORDS_INDEX};
use super::dialect::Dialect;
use super::dialect::SnowflakeDialect;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use std::fmt;
use crate::dialect::keywords::{Keyword, ALL_KEYWORDS, ALL_KEYWORDS_INDEX};
use crate::dialect::Dialect;
use crate::dialect::SnowflakeDialect;
/// SQL Token enumeration
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@ -184,6 +185,7 @@ impl Token {
pub fn make_keyword(keyword: &str) -> Self {
Token::make_word(keyword, None)
}
pub fn make_word(word: &str, quote_style: Option<char>) -> Self {
let word_uppercase = word.to_uppercase();
Token::Word(Word {
@ -226,6 +228,7 @@ impl fmt::Display for Word {
}
}
}
impl Word {
fn matching_end_quote(ch: char) -> char {
match ch {