From c23b1ecb97ee16d4b2ecb2d9a97b39778d30f2ef Mon Sep 17 00:00:00 2001 From: Paweł Dybiec Date: Tue, 27 Dec 2022 17:47:24 +0000 Subject: format --- src/mattermost/client.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/mattermost/client.rs') diff --git a/src/mattermost/client.rs b/src/mattermost/client.rs index 6025970..3d59837 100644 --- a/src/mattermost/client.rs +++ b/src/mattermost/client.rs @@ -56,7 +56,10 @@ impl Client { } async fn get_working_ws_stream( &self, - ) -> Result, anyhow::Error> { + ) -> Result< + async_tungstenite::WebSocketStream, + anyhow::Error, + > { let url = format!("{}/api/v4/websocket", self.url.replacen("http", "ws", 1)); let token = self .bearer_token @@ -76,7 +79,7 @@ impl Client { handler: T, mut shutdown: tokio::sync::mpsc::UnboundedReceiver<()>, ) -> Result<(), anyhow::Error> { - let mut ws_stream=self.get_working_ws_stream().await?; + let mut ws_stream = self.get_working_ws_stream().await?; loop { tokio::select! { message = ws_stream.next() => { -- cgit 1.4.1