From 54c428667240042ac95e56f0ea47d17fda81e990 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Mon, 4 Jul 2022 17:03:32 +0300 Subject: [PATCH] Use double dot syntax in `operator/mod.rs`. --- src/operator/mod.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/operator/mod.rs b/src/operator/mod.rs index 3ebf4a1..a8ae045 100644 --- a/src/operator/mod.rs +++ b/src/operator/mod.rs @@ -123,9 +123,9 @@ impl Operator { Tuple => 40, Chain => 0, - Const { value: _ } => 200, - VariableIdentifier { identifier: _ } => 200, - FunctionIdentifier { identifier: _ } => 190, + Const { .. } => 200, + VariableIdentifier { .. } => 200, + FunctionIdentifier { .. } => 190, } } @@ -134,7 +134,7 @@ impl Operator { /// Left-to-right chaining has priority if operators with different order but same precedence are chained. pub(crate) const fn is_left_to_right(&self) -> bool { use crate::operator::Operator::*; - !matches!(self, Assign | FunctionIdentifier { identifier: _ }) + !matches!(self, Assign | FunctionIdentifier { .. }) } /// Returns true if chains of this operator should be flattened into one operator with many arguments. @@ -158,9 +158,9 @@ impl Operator { | AndAssign | OrAssign => Some(2), Tuple | Chain => None, Not | Neg | RootNode => Some(1), - Const { value: _ } => Some(0), - VariableIdentifier { identifier: _ } => Some(0), - FunctionIdentifier { identifier: _ } => Some(1), + Const { .. } => Some(0), + VariableIdentifier { .. } => Some(0), + FunctionIdentifier { .. } => Some(1), } }