From 47f17efcfb3ed8d0f8937fdf06d5809136ee05a8 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Sat, 23 Jan 2021 11:44:59 +0000 Subject: [PATCH] impl PartialEq for ActiveOrder --- rustybot/src/models.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rustybot/src/models.rs b/rustybot/src/models.rs index a4b04f7..5c89a44 100644 --- a/rustybot/src/models.rs +++ b/rustybot/src/models.rs @@ -129,6 +129,14 @@ impl Hash for ActiveOrder { } } +impl PartialEq for ActiveOrder { + fn eq(&self, other: &Self) -> bool { + self.id == other.id && self.client_id == other.client_id && self.group_id == other.group_id + } +} + +impl Eq for ActiveOrder {} + #[derive(Copy, Clone, Debug, Hash)] pub enum OrderKind { Limit,