From eb3e22199efee6010183b40c174e1e0d1a6799a3 Mon Sep 17 00:00:00 2001 From: Hiranmaya Gundu Date: Fri, 19 Apr 2024 18:04:50 -0700 Subject: [PATCH] fix: return early --- src/parser/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 61ac5c02a..20085ba7a 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -8821,10 +8821,10 @@ impl<'a> Parser<'a> { let opt_ilike = if self.parse_keyword(Keyword::ILIKE) { let next_token = self.next_token(); let pattern = match next_token.token { - Token::SingleQuotedString(s) => Ok(s), - _ => self.expected("ilike pattern", next_token), + Token::SingleQuotedString(s) => s, + _ => return self.expected("ilike pattern", next_token), }; - Some(IlikeSelectItem { pattern: pattern? }) + Some(IlikeSelectItem { pattern: pattern }) } else { None };