From 21b44905366d4268e598fe5ee693f2973be92d5c Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Tue, 14 Dec 2021 15:10:00 +1100 Subject: [PATCH] Clarify name of constructor --- daemon/src/db.rs | 2 +- daemon/src/maker_cfd.rs | 2 +- daemon/src/model/cfd.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/src/db.rs b/daemon/src/db.rs index 7d35cef..1069381 100644 --- a/daemon/src/db.rs +++ b/daemon/src/db.rs @@ -398,7 +398,7 @@ mod tests { impl Order { fn dummy() -> Self { - Order::new( + Order::new_short( Price::new(dec!(1000)).unwrap(), Usd::new(dec!(100)), Usd::new(dec!(1000)), diff --git a/daemon/src/maker_cfd.rs b/daemon/src/maker_cfd.rs index 9913423..66e815a 100644 --- a/daemon/src/maker_cfd.rs +++ b/daemon/src/maker_cfd.rs @@ -730,7 +730,7 @@ where time::OffsetDateTime::now_utc() + self.settlement_interval, )?; - let order = Order::new( + let order = Order::new_short( price, min_quantity, max_quantity, diff --git a/daemon/src/model/cfd.rs b/daemon/src/model/cfd.rs index 08af653..bfc3017 100644 --- a/daemon/src/model/cfd.rs +++ b/daemon/src/model/cfd.rs @@ -149,7 +149,7 @@ pub struct Order { } impl Order { - pub fn new( + pub fn new_short( price: Price, min_quantity: Usd, max_quantity: Usd,