Commit c3219f6a authored by Éloïs's avatar Éloïs

[style] fix clippy warning : new() must return Self

parent ff501f44
Pipeline #4028 passed with stages
in 12 minutes
......@@ -65,7 +65,7 @@ pub struct Ws2pConnectionHandler {
impl Ws2pConnectionHandler {
/// Instantiate new Ws2pConnectionHandler
pub fn new(
pub fn try_new(
ws: WsSender,
service_sender: mpsc::Sender<Ws2pServiceSender>,
currency: CurrencyName,
......
......@@ -45,7 +45,7 @@ pub fn listen_on_ws2p_v2_endpoint(
listen(ws_url, move |ws| {
println!("DEBUG: Listen on host:port...");
DeflateBuilder::new().build(
Ws2pConnectionHandler::new(
Ws2pConnectionHandler::try_new(
WsSender(ws),
service_sender.clone(),
currency.clone(),
......
......@@ -52,7 +52,7 @@ pub fn connect_to_ws2p_v2_endpoint(
// Connect to websocket
connect(ws_url, move |ws| {
DeflateBuilder::new().build(
Ws2pConnectionHandler::new(
Ws2pConnectionHandler::try_new(
WsSender(ws),
service_sender.clone(),
currency.clone(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment