diff --git a/src/protocol/mod.rs b/src/protocol/mod.rs index f5bc684..17d1d9c 100644 --- a/src/protocol/mod.rs +++ b/src/protocol/mod.rs @@ -51,26 +51,26 @@ where pub encoder: E, } -impl Default for WebSocketConfig +impl Default for WebSocketConfig where - E: WebSocketExtension, + Ext: WebSocketExtension, { fn default() -> Self { WebSocketConfig { max_send_queue: None, max_frame_size: Some(16 << 20), - encoder: E::new(Some(MAX_MESSAGE_SIZE)), + encoder: Ext::new(Some(MAX_MESSAGE_SIZE)), } } } -impl WebSocketConfig +impl WebSocketConfig where - E: WebSocketExtension, + Ext: WebSocketExtension, { /// Creates a `WebSocketConfig` instance using the default configuration and the provided /// encoder for new connections. - pub fn default_with_encoder(encoder: E) -> WebSocketConfig { + pub fn default_with_encoder(encoder: Ext) -> WebSocketConfig { WebSocketConfig { max_send_queue: None, max_frame_size: Some(16 << 20),