diff --git a/.rustfmt.toml b/.rustfmt.toml index 17bc1efd..c8cbdc5e 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -1,4 +1,3 @@ -binop_separator = "Back" fn_params_layout = "Compressed" newline_style = "Unix" reorder_imports = false diff --git a/src/client.rs b/src/client.rs index 35032262..17abddfd 100644 --- a/src/client.rs +++ b/src/client.rs @@ -174,7 +174,7 @@ impl Client { Err(ErrorKind::BinanceError(error).into()) } s => { - bail!(format!("Received response: {:?}", s)); + bail!("Received response: {:?}", s); } } } diff --git a/src/futures/websockets.rs b/src/futures/websockets.rs index 0742acf5..926d8cd8 100755 --- a/src/futures/websockets.rs +++ b/src/futures/websockets.rs @@ -114,12 +114,12 @@ impl<'a> FuturesWebSockets<'a> { } } - pub fn connect(&mut self, market: &FuturesMarket, subscription: &'a str) -> Result<()> { + pub fn connect(&mut self, market: &FuturesMarket, subscription: &str) -> Result<()> { self.connect_wss(&FuturesWebsocketAPI::Default.params(market, subscription)) } pub fn connect_with_config( - &mut self, market: &FuturesMarket, subscription: &'a str, config: &'a Config, + &mut self, market: &FuturesMarket, subscription: &str, config: &Config, ) -> Result<()> { self.connect_wss( &FuturesWebsocketAPI::Custom(config.ws_endpoint.clone()).params(market, subscription), @@ -139,7 +139,7 @@ impl<'a> FuturesWebSockets<'a> { self.socket = Some(answer); Ok(()) } - Err(e) => bail!(format!("Error during handshake {}", e)), + Err(e) => bail!("Error during handshake {}", e), } } diff --git a/src/websockets.rs b/src/websockets.rs index 8abff2cd..32b8e3e9 100644 --- a/src/websockets.rs +++ b/src/websockets.rs @@ -105,7 +105,7 @@ impl<'a> WebSockets<'a> { self.socket = Some(answer); Ok(()) } - Err(e) => bail!(format!("Error during handshake {}", e)), + Err(e) => bail!("Error during handshake {}", e), } }