Update for new clippy ints (#571)

This commit is contained in:
Andrew Lamb 2022-08-11 17:18:46 -04:00 committed by GitHub
parent f07063f0cd
commit 36de9a69c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View file

@ -29,7 +29,7 @@ use crate::dialect::*;
use crate::keywords::{self, Keyword}; use crate::keywords::{self, Keyword};
use crate::tokenizer::*; use crate::tokenizer::*;
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq, Eq)]
pub enum ParserError { pub enum ParserError {
TokenizerError(String), TokenizerError(String),
ParserError(String), ParserError(String),
@ -51,7 +51,7 @@ macro_rules! return_ok_if_some {
}}; }};
} }
#[derive(PartialEq)] #[derive(PartialEq, Eq)]
pub enum IsOptional { pub enum IsOptional {
Optional, Optional,
Mandatory, Mandatory,
@ -848,7 +848,7 @@ impl<'a> Parser<'a> {
r#in: Box::new(from), r#in: Box::new(from),
}) })
} else { } else {
return parser_err!("Position function must include IN keyword".to_string()); parser_err!("Position function must include IN keyword".to_string())
} }
} }
@ -1745,7 +1745,7 @@ impl<'a> Parser<'a> {
let all = self.parse_keyword(Keyword::ALL); let all = self.parse_keyword(Keyword::ALL);
let distinct = self.parse_keyword(Keyword::DISTINCT); let distinct = self.parse_keyword(Keyword::DISTINCT);
if all && distinct { if all && distinct {
return parser_err!("Cannot specify both ALL and DISTINCT".to_string()); parser_err!("Cannot specify both ALL and DISTINCT".to_string())
} else { } else {
Ok(distinct) Ok(distinct)
} }

View file

@ -301,7 +301,7 @@ impl fmt::Display for Whitespace {
} }
/// Tokenizer error /// Tokenizer error
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq, Eq)]
pub struct TokenizerError { pub struct TokenizerError {
pub message: String, pub message: String,
pub line: u64, pub line: u64,