diff --git a/rustybot/src/connectors.rs b/rustybot/src/connectors.rs index 24bd9b4..55644f2 100644 --- a/rustybot/src/connectors.rs +++ b/rustybot/src/connectors.rs @@ -1,5 +1,5 @@ use std::convert::{TryFrom, TryInto}; -use std::error::Error; + use std::fmt::{Debug, Formatter}; use std::str::FromStr; use std::sync::Arc; @@ -8,8 +8,8 @@ use async_trait::async_trait; use bitfinex::api::Bitfinex; use bitfinex::orders::{CancelOrderForm, OrderMeta, OrderResponse}; use bitfinex::ticker::TradingPairTicker; -use futures_retry::{FutureRetry, RetryPolicy, StreamRetryExt}; -use futures_util::task::FutureObj; +use futures_retry::{FutureRetry, RetryPolicy}; + use log::trace; use tokio::macros::support::Future; use tokio::time::Duration; @@ -47,7 +47,7 @@ impl Client { api_secret, } => Self { 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, ) .await - .map_err(|(e, attempts)| e)?; + .map_err(|(e, _attempts)| e)?; let positions: Vec<_> = active_positions .into_iter() @@ -193,7 +193,7 @@ impl Connector for BitfinexConnector { BitfinexConnector::handle_small_nonce_error, ) .await - .map_err(|(e, attempts)| e)?; + .map_err(|(e, _attempts)| e)?; Ok(response.iter().map(Into::into).collect()) }