diff --git a/src/ws/client.rs b/src/ws/client.rs index 1d34b864b..2d385239d 100644 --- a/src/ws/client.rs +++ b/src/ws/client.rs @@ -128,7 +128,7 @@ impl WsClient { } /// Set supported websocket protocols - pub fn protocols(&mut self, protos: U) -> &mut Self + pub fn protocols(mut self, protos: U) -> Self where U: IntoIterator + 'static, V: AsRef { @@ -140,13 +140,13 @@ impl WsClient { } /// Set cookie for handshake request - pub fn cookie<'c>(&mut self, cookie: Cookie<'c>) -> &mut Self { + pub fn cookie<'c>(mut self, cookie: Cookie<'c>) -> Self { self.request.cookie(cookie); self } /// Set request Origin - pub fn origin(&mut self, origin: V) -> &mut Self + pub fn origin(mut self, origin: V) -> Self where HeaderValue: HttpTryFrom { match HeaderValue::try_from(origin) { @@ -157,7 +157,7 @@ impl WsClient { } /// Set request header - pub fn header(&mut self, key: K, value: V) -> &mut Self + pub fn header(mut self, key: K, value: V) -> Self where HeaderName: HttpTryFrom, HeaderValue: HttpTryFrom { self.request.header(key, value);