From 549f1277292cc0acf6c98af9d1b6ed8e8028953c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Mon, 30 Mar 2020 05:54:14 +0200 Subject: [PATCH] Derive simple enums from basic traits This adds derive statements from Copy, Clone, PartialEq, and Eq to the operator enums as well as SpecialInteger. --- src/ast.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ast.rs b/src/ast.rs index 4bf9b4d..b75d806 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -1,5 +1,6 @@ // Operators +#[derive(Clone, Copy, Eq, PartialEq)] pub enum BinaryOperator { Add, @@ -10,6 +11,7 @@ pub enum BinaryOperator Exponentiate, } +#[derive(Clone, Copy, Eq, PartialEq)] pub enum ComparisonOperator { Greater, @@ -20,6 +22,7 @@ pub enum ComparisonOperator Equal, } +#[derive(Clone, Copy, Eq, PartialEq)] pub enum UnaryOperator { AbsoluteValue, @@ -171,6 +174,7 @@ impl Function } } +#[derive(Clone, Copy, Eq, PartialEq)] pub enum SpecialInteger { Infimum,