cargo fix

This commit is contained in:
Giulio De Pasquale 2021-01-27 17:01:26 +00:00
parent 382f9c8106
commit 6ed510f2cc

View File

@ -1,5 +1,5 @@
use std::convert::{TryFrom, TryInto}; use std::convert::{TryFrom, TryInto};
use std::error::Error;
use std::fmt::{Debug, Formatter}; use std::fmt::{Debug, Formatter};
use std::str::FromStr; use std::str::FromStr;
use std::sync::Arc; use std::sync::Arc;
@ -8,8 +8,8 @@ use async_trait::async_trait;
use bitfinex::api::Bitfinex; use bitfinex::api::Bitfinex;
use bitfinex::orders::{CancelOrderForm, OrderMeta, OrderResponse}; use bitfinex::orders::{CancelOrderForm, OrderMeta, OrderResponse};
use bitfinex::ticker::TradingPairTicker; use bitfinex::ticker::TradingPairTicker;
use futures_retry::{FutureRetry, RetryPolicy, StreamRetryExt}; use futures_retry::{FutureRetry, RetryPolicy};
use futures_util::task::FutureObj;
use log::trace; use log::trace;
use tokio::macros::support::Future; use tokio::macros::support::Future;
use tokio::time::Duration; use tokio::time::Duration;
@ -47,7 +47,7 @@ impl Client {
api_secret, api_secret,
} => Self { } => Self {
exchange: Exchange::Bitfinex, exchange: Exchange::Bitfinex,
inner: Arc::new(Box::new((BitfinexConnector::new(api_key, api_secret)))), inner: Arc::new(Box::new(BitfinexConnector::new(api_key, api_secret))),
}, },
} }
} }
@ -167,7 +167,7 @@ impl Connector for BitfinexConnector {
BitfinexConnector::handle_small_nonce_error, BitfinexConnector::handle_small_nonce_error,
) )
.await .await
.map_err(|(e, attempts)| e)?; .map_err(|(e, _attempts)| e)?;
let positions: Vec<_> = active_positions let positions: Vec<_> = active_positions
.into_iter() .into_iter()
@ -193,7 +193,7 @@ impl Connector for BitfinexConnector {
BitfinexConnector::handle_small_nonce_error, BitfinexConnector::handle_small_nonce_error,
) )
.await .await
.map_err(|(e, attempts)| e)?; .map_err(|(e, _attempts)| e)?;
Ok(response.iter().map(Into::into).collect()) Ok(response.iter().map(Into::into).collect())
} }