From bff48681d2ef798e2df555bc0e91e7c4bcca1184 Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 9 Nov 2021 17:05:36 +0100 Subject: [PATCH] Re-order the operator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Clément Renault --- filter-parser/src/condition.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/filter-parser/src/condition.rs b/filter-parser/src/condition.rs index cff2f2fdd..abd549534 100644 --- a/filter-parser/src/condition.rs +++ b/filter-parser/src/condition.rs @@ -46,12 +46,12 @@ pub fn parse_condition(input: Span) -> IResult { let (input, (fid, op, value)) = tuple((parse_value, operator, cut(parse_value)))(input)?; let condition = match *op.fragment() { - "=" => FilterCondition::Condition { fid, op: Equal(value) }, - "!=" => FilterCondition::Condition { fid, op: NotEqual(value) }, - ">" => FilterCondition::Condition { fid, op: GreaterThan(value) }, - "<" => FilterCondition::Condition { fid, op: LowerThan(value) }, "<=" => FilterCondition::Condition { fid, op: LowerThanOrEqual(value) }, ">=" => FilterCondition::Condition { fid, op: GreaterThanOrEqual(value) }, + "!=" => FilterCondition::Condition { fid, op: NotEqual(value) }, + "<" => FilterCondition::Condition { fid, op: LowerThan(value) }, + ">" => FilterCondition::Condition { fid, op: GreaterThan(value) }, + "=" => FilterCondition::Condition { fid, op: Equal(value) }, _ => unreachable!(), };