From bdc42480b2b44cf15592aed190049e5289d5ce65 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Tue, 10 Jul 2018 23:39:09 +0300 Subject: [PATCH] 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 --- src/protocol/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocol/mod.rs b/src/protocol/mod.rs index 7fb2259..d1eb958 100644 --- a/src/protocol/mod.rs +++ b/src/protocol/mod.rs @@ -122,7 +122,7 @@ impl WebSocket { incomplete: None, send_queue: VecDeque::new(), pong: None, - config: config.unwrap_or_else(|| WebSocketConfig::default()), + config: config.unwrap_or_else(WebSocketConfig::default), } } }