diff options
Diffstat (limited to 'src/mattermost')
-rw-r--r-- | src/mattermost/client.rs | 7 |
1 files changed, 5 insertions, 2 deletions
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<async_tungstenite::WebSocketStream<async_tungstenite::tokio::ConnectStream>, anyhow::Error> { + ) -> Result< + async_tungstenite::WebSocketStream<async_tungstenite::tokio::ConnectStream>, + 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() => { |