summaryrefslogtreecommitdiffstats
path: root/examples/websocket
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-04-11 07:53:26 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-04-11 07:53:26 +0200
commit0ed54346b0d6271cf5874debef1de57f8322a249 (patch)
tree7503390b65a2956bd82e3c4058cac1cf794a844f /examples/websocket
parent5908205a62eb160af745039b9ce0aa5329f984ba (diff)
downloadiced-0ed54346b0d6271cf5874debef1de57f8322a249.tar.gz
iced-0ed54346b0d6271cf5874debef1de57f8322a249.tar.bz2
iced-0ed54346b0d6271cf5874debef1de57f8322a249.zip
Use `Result::is_err` in `websocket` example
Diffstat (limited to 'examples/websocket')
-rw-r--r--examples/websocket/src/echo.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/websocket/src/echo.rs b/examples/websocket/src/echo.rs
index f6c46e95..f9807172 100644
--- a/examples/websocket/src/echo.rs
+++ b/examples/websocket/src/echo.rs
@@ -69,7 +69,7 @@ pub fn connect() -> Subscription<Event> {
message = input.select_next_some() => {
let result = websocket.send(tungstenite::Message::Text(message.to_string())).await;
- if !result.is_ok() {
+ if result.is_err() {
let _ = output.send(Event::Disconnected).await;
state = State::Disconnected;