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,