From 1368327270b5e338bdf1aab14d1a92cfcd1f8d9f Mon Sep 17 00:00:00 2001 From: canonbrother Date: Tue, 30 Apr 2024 22:21:43 +0800 Subject: [PATCH] add Clone on PoolPairInfo --- json/src/poolpair.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/json/src/poolpair.rs b/json/src/poolpair.rs index c7015e2..f979113 100644 --- a/json/src/poolpair.rs +++ b/json/src/poolpair.rs @@ -1,7 +1,7 @@ -use std::collections::{HashMap, BTreeMap}; -use serde_with::skip_serializing_none; use serde::{Deserialize, Deserializer}; use serde_json::Value; +use serde_with::skip_serializing_none; +use std::collections::{BTreeMap, HashMap}; #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] @@ -36,7 +36,7 @@ fn to_float<'de, D: Deserializer<'de>>(deserializer: D) -> std::result::Result s.parse::().ok().unwrap(), Value::Number(num) => num.as_f64().unwrap_or_default(), - _ => return Err(serde::de::Error::custom("Error parsing")) + _ => return Err(serde::de::Error::custom("Error parsing")), }) } @@ -44,7 +44,7 @@ fn to_float<'de, D: Deserializer<'de>>(deserializer: D) -> std::result::Result); #[skip_serializing_none] -#[derive(Debug, Serialize, Deserialize)] +#[derive(Debug, Serialize, Deserialize, Clone)] #[serde(rename_all = "camelCase")] pub struct PoolPairInfo { pub symbol: String,