impl PartialEq for ActiveOrder

This commit is contained in:
Giulio De Pasquale 2021-01-23 11:44:59 +00:00
parent b5b3455f08
commit 47f17efcfb

View File

@ -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)] #[derive(Copy, Clone, Debug, Hash)]
pub enum OrderKind { pub enum OrderKind {
Limit, Limit,