Kaynağa Gözat

coinex 消除警告

JiahengHe 1 yıl önce
ebeveyn
işleme
33dbe1d8fc
1 değiştirilmiş dosya ile 2 ekleme ve 4 silme
  1. 2 4
      strategy/src/coinex_usdt_swap.rs

+ 2 - 4
strategy/src/coinex_usdt_swap.rs

@@ -9,11 +9,9 @@ use exchanges::coinex_swap_ws::{CoinexSwapLogin, CoinexSwapSubscribeType, Coinex
 use exchanges::response_base::ResponseData;
 use global::trace_stack::{TraceStack};
 use standard::exchange::ExchangeEnum::{CoinexSwap};
-use standard::{Position, PositionModeEnum};
 use crate::model::{OrderInfo};
 use crate::core::Core;
 use crate::exchange_disguise::on_special_depth;
-use crate::utils::generate_client_id;
 
 // 1交易、0参考 coinex 合约 启动
 pub async fn coinex_swap_run(is_shutdown_arc: Arc<AtomicBool>,
@@ -140,7 +138,7 @@ async fn on_data(core_arc_clone: Arc<Mutex<Core>>,
             match side {
                 "kd" => {
                     if short_pos != Decimal::ZERO {
-                        let mut vir_order_filled = Decimal::ZERO;
+                        let vir_order_filled;
                         if short_pos >= new_order.amount {
                             vir_order_filled = new_order.amount;
                         } else {
@@ -183,7 +181,7 @@ async fn on_data(core_arc_clone: Arc<Mutex<Core>>,
                 }
                 "kk" => {
                     if long_pos != Decimal::ZERO {
-                        let mut vir_order_filled = Decimal::ZERO;
+                        let vir_order_filled;
                         if long_pos >= new_order.amount {
                             vir_order_filled = new_order.amount;
                         } else {