summaryrefslogtreecommitdiffstats
path: root/examples/websocket
diff options
context:
space:
mode:
Diffstat (limited to 'examples/websocket')
-rw-r--r--examples/websocket/Cargo.toml14
-rw-r--r--examples/websocket/src/echo/server.rs5
2 files changed, 8 insertions, 11 deletions
diff --git a/examples/websocket/Cargo.toml b/examples/websocket/Cargo.toml
index 03b240c6..2756e8e0 100644
--- a/examples/websocket/Cargo.toml
+++ b/examples/websocket/Cargo.toml
@@ -6,16 +6,16 @@ edition = "2021"
publish = false
[dependencies]
-iced = { path = "../..", features = ["tokio", "debug"] }
-once_cell = "1.15"
+iced.workspace = true
+iced.features = ["debug", "tokio"]
+
+once_cell.workspace = true
+warp = "0.3"
[dependencies.async-tungstenite]
-version = "0.16"
+version = "0.23"
features = ["tokio-rustls-webpki-roots"]
[dependencies.tokio]
-version = "1"
+workspace = true
features = ["time"]
-
-[dependencies.warp]
-version = "0.3"
diff --git a/examples/websocket/src/echo/server.rs b/examples/websocket/src/echo/server.rs
index 168a635e..a696a7a4 100644
--- a/examples/websocket/src/echo/server.rs
+++ b/examples/websocket/src/echo/server.rs
@@ -47,10 +47,7 @@ async fn user_connected(ws: WebSocket) {
});
while let Some(result) = user_ws_rx.next().await {
- let msg = match result {
- Ok(msg) => msg,
- Err(_) => break,
- };
+ let Ok(msg) = result else { break };
let _ = tx.send(msg).await;
}