From d0abf78daebc4f725316427389fc9324bc5bd03a Mon Sep 17 00:00:00 2001 From: TennyZhuang Date: Sat, 30 Mar 2024 18:26:47 +0800 Subject: [PATCH] clippy Signed-off-by: TennyZhuang --- src/sqlparser/src/parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sqlparser/src/parser.rs b/src/sqlparser/src/parser.rs index e8fdcb87710c..bad08268352f 100644 --- a/src/sqlparser/src/parser.rs +++ b/src/sqlparser/src/parser.rs @@ -1628,7 +1628,7 @@ impl Parser { pub fn parse_escape_char(&mut self) -> Result, ParserError> { if self.parse_keyword(Keyword::ESCAPE) { let s = self.parse_literal_string()?; - if s.len() == 0 { + if s.is_empty() { Ok(Some(EscapeChar::empty())) } else if s.len() == 1 { Ok(Some(EscapeChar::escape(s.chars().next().unwrap())))