summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-02-11 01:32:51 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-02-11 01:32:51 +0100
commit06ece6a8c30541b7b2b6bcbb370fdffc9f1fcb79 (patch)
tree9bd484e5b1f430d7c9df2cab13c3e4606a50ed4f /examples
parentf37d068af52700570f863960c3432df85a244a7c (diff)
downloadiced-06ece6a8c30541b7b2b6bcbb370fdffc9f1fcb79.tar.gz
iced-06ece6a8c30541b7b2b6bcbb370fdffc9f1fcb79.tar.bz2
iced-06ece6a8c30541b7b2b6bcbb370fdffc9f1fcb79.zip
Remove unneded `let _ =` in `websocket` example
Diffstat (limited to 'examples')
-rw-r--r--examples/websocket/src/echo.rs16
1 files changed, 6 insertions, 10 deletions
diff --git a/examples/websocket/src/echo.rs b/examples/websocket/src/echo.rs
index 6fa4c54a..149a260c 100644
--- a/examples/websocket/src/echo.rs
+++ b/examples/websocket/src/echo.rs
@@ -22,9 +22,7 @@ pub fn connect() -> impl Sipper<Never, Event> {
Ok((websocket, _)) => {
let (sender, receiver) = mpsc::channel(100);
- let _ = output
- .send(Event::Connected(Connection(sender)))
- .await;
+ output.send(Event::Connected(Connection(sender))).await;
(websocket.fuse(), receiver)
}
@@ -32,8 +30,7 @@ pub fn connect() -> impl Sipper<Never, Event> {
tokio::time::sleep(tokio::time::Duration::from_secs(1))
.await;
- let _ = output.send(Event::Disconnected).await;
-
+ output.send(Event::Disconnected).await;
continue;
}
};
@@ -43,21 +40,20 @@ pub fn connect() -> impl Sipper<Never, Event> {
received = websocket.select_next_some() => {
match received {
Ok(tungstenite::Message::Text(message)) => {
- let _ = output.send(Event::MessageReceived(Message::User(message))).await;
+ output.send(Event::MessageReceived(Message::User(message))).await;
}
Err(_) => {
- let _ = output.send(Event::Disconnected).await;
+ output.send(Event::Disconnected).await;
break;
}
- Ok(_) => continue,
+ Ok(_) => {},
}
}
-
message = input.select_next_some() => {
let result = websocket.send(tungstenite::Message::Text(message.to_string())).await;
if result.is_err() {
- let _ = output.send(Event::Disconnected).await;
+ output.send(Event::Disconnected).await;
}
}
}