소스 검색

fix faulty parsing while trying to deserialize fetched klines

Berke 1 년 전
부모
커밋
70773a0d03
1개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  1. 6 5
      src/data_providers/binance/market_data.rs

+ 6 - 5
src/data_providers/binance/market_data.rs

@@ -647,6 +647,7 @@ mod string_to_f32 {
     }
 }
 
+#[allow(dead_code)]
 #[derive(Deserialize, Debug, Clone)]
 struct FetchedKlines (
     u64,
@@ -655,12 +656,12 @@ struct FetchedKlines (
     #[serde(with = "string_to_f32")] f32,
     #[serde(with = "string_to_f32")] f32,
     #[serde(with = "string_to_f32")] f32,
-    (),
-    (),
-    (),
+    u64,
+    String,
+    u32,
     #[serde(with = "string_to_f32")] f32,
-    (),
-    (),
+    String,
+    String,
 );
 impl From<FetchedKlines> for Kline {
     fn from(fetched: FetchedKlines) -> Self {