@@ -8,8 +8,8 @@ use flate2::read::ZlibDecoder;
88use futures:: { SinkExt , StreamExt } ;
99use tokio:: net:: TcpStream ;
1010use tokio:: time:: { Duration , timeout} ;
11+ use tokio_tungstenite:: tungstenite:: Message ;
1112use tokio_tungstenite:: tungstenite:: protocol:: { CloseFrame , WebSocketConfig } ;
12- use tokio_tungstenite:: tungstenite:: { Error as WsError , Message } ;
1313use tokio_tungstenite:: { MaybeTlsStream , WebSocketStream , connect_async_with_config} ;
1414#[ cfg( feature = "tracing_instrument" ) ]
1515use tracing:: instrument;
@@ -20,7 +20,6 @@ use zstd_safe::{DStream as ZstdInflater, InBuffer, OutBuffer};
2020
2121use super :: { ActivityData , ChunkGuildFilter , GatewayError , PresenceData , TransportCompression } ;
2222use crate :: constants:: { self , Opcode } ;
23- use crate :: internal:: prelude:: * ;
2423use crate :: model:: event:: GatewayEvent ;
2524use crate :: model:: gateway:: { GatewayIntents , ShardInfo } ;
2625#[ cfg( feature = "voice" ) ]
@@ -237,10 +236,7 @@ pub struct WsClient {
237236const TIMEOUT : Duration = Duration :: from_millis ( 500 ) ;
238237
239238impl WsClient {
240- pub ( crate ) async fn connect (
241- url : Url ,
242- compression : TransportCompression ,
243- ) -> StdResult < Self , WsError > {
239+ pub ( crate ) async fn connect ( url : Url , compression : TransportCompression ) -> Result < Self > {
244240 let config = {
245241 let mut config = WebSocketConfig :: default ( ) ;
246242 config. max_message_size = None ;
@@ -293,7 +289,7 @@ impl WsClient {
293289 }
294290
295291 /// Delegate to `WebSocketStream::close`
296- pub ( crate ) async fn close ( & mut self , msg : Option < CloseFrame > ) -> StdResult < ( ) , WsError > {
292+ pub ( crate ) async fn close ( & mut self , msg : Option < CloseFrame > ) -> Result < ( ) > {
297293 self . stream . close ( msg) . await ?;
298294 Ok ( ( ) )
299295 }
0 commit comments