From ed7ccc8f2a10d9e43b8f911372959a4639dd7348 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Thu, 11 Aug 2022 17:18:46 -0400 Subject: [PATCH] Update for new clippy ints (#571) --- src/parser.rs | 6 +++--- src/tokenizer.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/parser.rs b/src/parser.rs index 2fc8c8ada..8ec476f1c 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -29,7 +29,7 @@ use crate::dialect::*; use crate::keywords::{self, Keyword}; use crate::tokenizer::*; -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub enum ParserError { TokenizerError(String), ParserError(String), @@ -51,7 +51,7 @@ macro_rules! return_ok_if_some { }}; } -#[derive(PartialEq)] +#[derive(PartialEq, Eq)] pub enum IsOptional { Optional, Mandatory, @@ -1576,7 +1576,7 @@ impl<'a> Parser<'a> { let all = self.parse_keyword(Keyword::ALL); let distinct = self.parse_keyword(Keyword::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 { Ok(distinct) } diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 5fcacbdae..3f17e09e7 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -286,7 +286,7 @@ impl fmt::Display for Whitespace { } /// Tokenizer error -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] pub struct TokenizerError { pub message: String, pub line: u64,