Skip to content

Commit

Permalink
Remove unneccesary lifetime constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
liumiao committed Apr 6, 2024
1 parent 7bc6f26 commit 964ef30
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ impl Client {
Err(ErrorKind::BinanceError(error).into())
}
s => {
bail!(format!("Received response: {:?}", s));
bail!("Received response: {:?}", s);
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/futures/websockets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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),
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/websockets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
}

Expand Down

0 comments on commit 964ef30

Please sign in to comment.