浏览代码

解决警告

JiahengHe 1 年之前
父节点
当前提交
4a47c52031
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      strategy/src/phemex_usdt_swap.rs

+ 2 - 2
strategy/src/phemex_usdt_swap.rs

@@ -11,7 +11,7 @@ use exchanges::response_base::ResponseData;
 use global::trace_stack::{TraceStack};
 use standard::exchange::ExchangeEnum::{PhemexSwap};
 use standard::handle_info::DepthParam;
-use standard::MarketOrder;
+use standard::{MarketOrder, Position};
 use crate::model::{OrderInfo};
 use crate::core::Core;
 use crate::exchange_disguise::on_special_depth;
@@ -142,7 +142,7 @@ async fn on_private_data(core_arc_clone: Arc<Mutex<Core>>,
             position_res.data = position_res.data["positions_p"].clone();
             let positions = standard::handle_info::HandleSwapInfo::handle_position(PhemexSwap, &position_res, &ct_val);
             // 只要正在运行中币对的仓位信息
-            let run_position = positions.into_iter().filter(|position| position.symbol.contains(&target_symbol)).collect();
+            let run_position: Vec<Position> = positions.into_iter().filter(|position| position.symbol.contains(&target_symbol)).collect();
             if run_position.len() > 0 {
                 let mut core = core_arc_clone.lock().await;
                 core.update_position(run_position).await;