Skip to content

Commit 36de9a6

Browse files
authored
Update for new clippy ints (#571)
1 parent f07063f commit 36de9a6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/parser.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use crate::dialect::*;
2929
use crate::keywords::{self, Keyword};
3030
use crate::tokenizer::*;
3131

32-
#[derive(Debug, Clone, PartialEq)]
32+
#[derive(Debug, Clone, PartialEq, Eq)]
3333
pub enum ParserError {
3434
TokenizerError(String),
3535
ParserError(String),
@@ -51,7 +51,7 @@ macro_rules! return_ok_if_some {
5151
}};
5252
}
5353

54-
#[derive(PartialEq)]
54+
#[derive(PartialEq, Eq)]
5555
pub enum IsOptional {
5656
Optional,
5757
Mandatory,
@@ -848,7 +848,7 @@ impl<'a> Parser<'a> {
848848
r#in: Box::new(from),
849849
})
850850
} else {
851-
return parser_err!("Position function must include IN keyword".to_string());
851+
parser_err!("Position function must include IN keyword".to_string())
852852
}
853853
}
854854

@@ -1745,7 +1745,7 @@ impl<'a> Parser<'a> {
17451745
let all = self.parse_keyword(Keyword::ALL);
17461746
let distinct = self.parse_keyword(Keyword::DISTINCT);
17471747
if all && distinct {
1748-
return parser_err!("Cannot specify both ALL and DISTINCT".to_string());
1748+
parser_err!("Cannot specify both ALL and DISTINCT".to_string())
17491749
} else {
17501750
Ok(distinct)
17511751
}

src/tokenizer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ impl fmt::Display for Whitespace {
301301
}
302302

303303
/// Tokenizer error
304-
#[derive(Debug, PartialEq)]
304+
#[derive(Debug, PartialEq, Eq)]
305305
pub struct TokenizerError {
306306
pub message: String,
307307
pub line: u64,

0 commit comments

Comments
 (0)