Use Result::is_err in websocket example
This commit is contained in:
parent
5908205a62
commit
0ed54346b0
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue