summaryrefslogtreecommitdiffstats
path: root/examples/websocket/src/echo/server.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-07-09 18:42:41 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-07-09 18:43:05 +0200
commit2065a40f642589134142a740ff4198deaa4c378b (patch)
tree00477d6d7cb571332062535557151d5b031d8925 /examples/websocket/src/echo/server.rs
parentd53cc5498b92fb6b573867f5ccb5f8ac93f6be79 (diff)
downloadiced-2065a40f642589134142a740ff4198deaa4c378b.tar.gz
iced-2065a40f642589134142a740ff4198deaa4c378b.tar.bz2
iced-2065a40f642589134142a740ff4198deaa4c378b.zip
Fix `clippy` lints for all crates and features
... and check those in CI as well!
Diffstat (limited to 'examples/websocket/src/echo/server.rs')
-rw-r--r--examples/websocket/src/echo/server.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/websocket/src/echo/server.rs b/examples/websocket/src/echo/server.rs
index 7702d417..fef89a12 100644
--- a/examples/websocket/src/echo/server.rs
+++ b/examples/websocket/src/echo/server.rs
@@ -27,9 +27,9 @@ use warp::Filter;
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
pub async fn run() {
- let routes = warp::path::end().and(warp::ws()).map(|ws: warp::ws::Ws| {
- ws.on_upgrade(move |socket| user_connected(socket))
- });
+ let routes = warp::path::end()
+ .and(warp::ws())
+ .map(|ws: warp::ws::Ws| ws.on_upgrade(user_connected));
warp::serve(routes).run(([127, 0, 0, 1], 3030)).await;
}
@@ -40,7 +40,7 @@ async fn user_connected(ws: WebSocket) {
tokio::task::spawn(async move {
while let Some(message) = rx.next().await {
- let _ = user_ws_tx.send(message).await.unwrap_or_else(|e| {
+ user_ws_tx.send(message).await.unwrap_or_else(|e| {
eprintln!("websocket send error: {}", e);
});
}