protocol: remove redundant closure

warning: redundant closure found
   --> src/protocol/mod.rs:114:43
    |
114 |             config: config.unwrap_or_else(|| WebSocketConfig::default()),
    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `WebSocketConfig::default`
    |
    = note: #[warn(redundant_closure)] on by default
    = help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#redundant_closure
pull/39/head
Ran Benita 7 years ago
parent c7a71106ac
commit bdc42480b2
  1. 2
      src/protocol/mod.rs

@ -122,7 +122,7 @@ impl<Stream> WebSocket<Stream> {
incomplete: None,
send_queue: VecDeque::new(),
pong: None,
config: config.unwrap_or_else(|| WebSocketConfig::default()),
config: config.unwrap_or_else(WebSocketConfig::default),
}
}
}

Loading…
Cancel
Save