mirror of
https://github.com/loot/loot-condition-interpreter.git
synced 2026-07-27 14:16:09 -07:00
Derive PartialEq, Eq for Expression, CompoundCondition and Condition
This commit is contained in:
+3
-3
@@ -93,7 +93,7 @@ pub struct State {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Compound conditions joined by 'or'
|
// Compound conditions joined by 'or'
|
||||||
#[derive(Debug)]
|
#[derive(Debug, PartialEq, Eq)]
|
||||||
pub struct Expression(Vec<CompoundCondition>);
|
pub struct Expression(Vec<CompoundCondition>);
|
||||||
|
|
||||||
impl Expression {
|
impl Expression {
|
||||||
@@ -117,7 +117,7 @@ impl Expression {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Conditions joined by 'and'
|
// Conditions joined by 'and'
|
||||||
#[derive(Debug)]
|
#[derive(Debug, PartialEq, Eq)]
|
||||||
struct CompoundCondition(Vec<Condition>);
|
struct CompoundCondition(Vec<Condition>);
|
||||||
|
|
||||||
impl CompoundCondition {
|
impl CompoundCondition {
|
||||||
@@ -139,7 +139,7 @@ impl CompoundCondition {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug, PartialEq, Eq)]
|
||||||
enum Condition {
|
enum Condition {
|
||||||
Function(Function),
|
Function(Function),
|
||||||
InvertedFunction(Function),
|
InvertedFunction(Function),
|
||||||
|
|||||||
Reference in New Issue
Block a user