From d14960360f680d0b528df8355f532d248b32e1f3 Mon Sep 17 00:00:00 2001 From: Vedat Can Keklik Date: Wed, 18 Dec 2024 11:51:18 +0300 Subject: [PATCH] fix: Some gymnastics for clippy --- lykiadb-lang/src/parser/mod.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lykiadb-lang/src/parser/mod.rs b/lykiadb-lang/src/parser/mod.rs index b3577a9..81db576 100644 --- a/lykiadb-lang/src/parser/mod.rs +++ b/lykiadb-lang/src/parser/mod.rs @@ -1111,13 +1111,12 @@ impl Parser<'_> { (None, false) }; - if second_expr.is_some() && reverse { - Some(SqlLimitClause { + match (&second_expr, reverse) { + (Some(_), true) => Some(SqlLimitClause { count: second_expr.unwrap(), offset: Some(first_expr), - }) - } else { - Some(SqlLimitClause { + }), + _ => Some(SqlLimitClause { count: first_expr, offset: second_expr, })