Derive simple enums from basic traits

This adds derive statements from Copy, Clone, PartialEq, and Eq to the
operator enums as well as SpecialInteger.
This commit is contained in:
Patrick Lühne 2020-03-30 05:54:14 +02:00
parent a304ec9a75
commit 549f127729
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
1 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,6 @@
// Operators // Operators
#[derive(Clone, Copy, Eq, PartialEq)]
pub enum BinaryOperator pub enum BinaryOperator
{ {
Add, Add,
@ -10,6 +11,7 @@ pub enum BinaryOperator
Exponentiate, Exponentiate,
} }
#[derive(Clone, Copy, Eq, PartialEq)]
pub enum ComparisonOperator pub enum ComparisonOperator
{ {
Greater, Greater,
@ -20,6 +22,7 @@ pub enum ComparisonOperator
Equal, Equal,
} }
#[derive(Clone, Copy, Eq, PartialEq)]
pub enum UnaryOperator pub enum UnaryOperator
{ {
AbsoluteValue, AbsoluteValue,
@ -171,6 +174,7 @@ impl Function
} }
} }
#[derive(Clone, Copy, Eq, PartialEq)]
pub enum SpecialInteger pub enum SpecialInteger
{ {
Infimum, Infimum,