From 242435c698b4e4528e10007a9a6b38d1a93bdd4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Sat, 1 Feb 2020 17:40:15 +0100 Subject: [PATCH] Add useful derive statements --- src/ast.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ast.rs b/src/ast.rs index 601ab18..7fa5ccb 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -28,7 +28,7 @@ pub enum UnaryOperator // Primitives -#[derive(Eq, Hash, PartialEq)] +#[derive(Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct FunctionDeclaration { pub name: String, @@ -37,7 +37,7 @@ pub struct FunctionDeclaration pub type FunctionDeclarations = std::collections::HashSet>; -#[derive(Eq, Hash, PartialEq)] +#[derive(Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct PredicateDeclaration { pub name: String, @@ -46,7 +46,7 @@ pub struct PredicateDeclaration pub type PredicateDeclarations = std::collections::HashSet>; -#[derive(Eq, Hash, PartialEq)] +#[derive(Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct VariableDeclaration { pub name: String,