Renames ambiguous extension type parameters

pull/144/head
SirCipher 5 years ago
parent 2744d1be4f
commit fcf56c31c5
  1. 12
      src/protocol/mod.rs

@ -51,26 +51,26 @@ where
pub encoder: E, pub encoder: E,
} }
impl<E> Default for WebSocketConfig<E> impl<Ext> Default for WebSocketConfig<Ext>
where where
E: WebSocketExtension, Ext: WebSocketExtension,
{ {
fn default() -> Self { fn default() -> Self {
WebSocketConfig { WebSocketConfig {
max_send_queue: None, max_send_queue: None,
max_frame_size: Some(16 << 20), max_frame_size: Some(16 << 20),
encoder: E::new(Some(MAX_MESSAGE_SIZE)), encoder: Ext::new(Some(MAX_MESSAGE_SIZE)),
} }
} }
} }
impl<E> WebSocketConfig<E> impl<Ext> WebSocketConfig<Ext>
where where
E: WebSocketExtension, Ext: WebSocketExtension,
{ {
/// Creates a `WebSocketConfig` instance using the default configuration and the provided /// Creates a `WebSocketConfig` instance using the default configuration and the provided
/// encoder for new connections. /// encoder for new connections.
pub fn default_with_encoder(encoder: E) -> WebSocketConfig<E> { pub fn default_with_encoder(encoder: Ext) -> WebSocketConfig<Ext> {
WebSocketConfig { WebSocketConfig {
max_send_queue: None, max_send_queue: None,
max_frame_size: Some(16 << 20), max_frame_size: Some(16 << 20),

Loading…
Cancel
Save