Skip to content

Commit 9ee76eb

Browse files
author
liumiao
committed
Remove unneccesary lifetime constraint
1 parent 7bc6f26 commit 9ee76eb

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

.rustfmt.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
binop_separator = "Back"
21
fn_params_layout = "Compressed"
32
newline_style = "Unix"
43
reorder_imports = false

src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ impl Client {
174174
Err(ErrorKind::BinanceError(error).into())
175175
}
176176
s => {
177-
bail!(format!("Received response: {:?}", s));
177+
bail!("Received response: {:?}", s);
178178
}
179179
}
180180
}

src/futures/websockets.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@ impl<'a> FuturesWebSockets<'a> {
114114
}
115115
}
116116

117-
pub fn connect(&mut self, market: &FuturesMarket, subscription: &'a str) -> Result<()> {
117+
pub fn connect(&mut self, market: &FuturesMarket, subscription: &str) -> Result<()> {
118118
self.connect_wss(&FuturesWebsocketAPI::Default.params(market, subscription))
119119
}
120120

121121
pub fn connect_with_config(
122-
&mut self, market: &FuturesMarket, subscription: &'a str, config: &'a Config,
122+
&mut self, market: &FuturesMarket, subscription: &str, config: &Config,
123123
) -> Result<()> {
124124
self.connect_wss(
125125
&FuturesWebsocketAPI::Custom(config.ws_endpoint.clone()).params(market, subscription),
@@ -139,7 +139,7 @@ impl<'a> FuturesWebSockets<'a> {
139139
self.socket = Some(answer);
140140
Ok(())
141141
}
142-
Err(e) => bail!(format!("Error during handshake {}", e)),
142+
Err(e) => bail!("Error during handshake {}", e),
143143
}
144144
}
145145

src/websockets.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl<'a> WebSockets<'a> {
105105
self.socket = Some(answer);
106106
Ok(())
107107
}
108-
Err(e) => bail!(format!("Error during handshake {}", e)),
108+
Err(e) => bail!("Error during handshake {}", e),
109109
}
110110
}
111111

0 commit comments

Comments
 (0)