From c211d046cb58f2df271417d04aa0e5fd03199adc Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Tue, 10 Jul 2018 23:32:57 +0300 Subject: [PATCH] handshake: remove .clone() from Copy types warning: using `clone` on a `Copy` type --> src/handshake/server.rs:159:21 | 159 | self.config.clone(), | ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.config` | = help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#clone_on_copy --- src/handshake/client.rs | 2 +- src/handshake/server.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/handshake/client.rs b/src/handshake/client.rs index fc2581d..82a297a 100644 --- a/src/handshake/client.rs +++ b/src/handshake/client.rs @@ -135,7 +135,7 @@ impl HandshakeRole for ClientHandshake { stream, tail, Role::Client, - self.config.clone(), + self.config, ); ProcessingResult::Done((websocket, result)) } diff --git a/src/handshake/server.rs b/src/handshake/server.rs index 11a8ffb..aed7edf 100644 --- a/src/handshake/server.rs +++ b/src/handshake/server.rs @@ -156,7 +156,7 @@ impl HandshakeRole for ServerHandshake { let websocket = WebSocket::from_raw_socket( stream, Role::Server, - self.config.clone(), + self.config, ); ProcessingResult::Done(websocket) }