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
pull/39/head
Ran Benita 7 years ago
parent 2585feba44
commit c211d046cb
  1. 2
      src/handshake/client.rs
  2. 2
      src/handshake/server.rs

@ -135,7 +135,7 @@ impl<S: Read + Write> HandshakeRole for ClientHandshake<S> {
stream,
tail,
Role::Client,
self.config.clone(),
self.config,
);
ProcessingResult::Done((websocket, result))
}

@ -156,7 +156,7 @@ impl<S: Read + Write, C: Callback> HandshakeRole for ServerHandshake<S, C> {
let websocket = WebSocket::from_raw_socket(
stream,
Role::Server,
self.config.clone(),
self.config,
);
ProcessingResult::Done(websocket)
}

Loading…
Cancel
Save