Created
April 22, 2016 04:04
-
-
Save vinipsmaker/c6ad5a797d4d7aa9cd20b4aeac4bef90 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
match network_rx.receive() { | |
Ok(CrustMsg::Message(msg)) => { | |
if let Err(err) = event_tx.send(Event::NewMessage(their_id, msg)) { | |
error!("Error sending message to {:?}: {:?}", their_id, err); | |
break; | |
} | |
} | |
Ok(m) => error!("Unexpected message in start_rx: {:?}", m), | |
Err(err) => { | |
error!("Error receiving from {:?}: {:?}", their_id, err); | |
break; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
match network_rx.receive() { | |
Ok(msg) => match msg { | |
CrustMsg::Message(msg) => { | |
if let Err(err) = event_tx.send(Event::NewMessage(their_id, msg)) { | |
error!("Error sending message to {:?}: {:?}", their_id, err); | |
break; | |
} | |
} | |
m => error!("Unexpected message in start_rx: {:?}", m), | |
}, | |
Err(err) => { | |
error!("Error receiving from {:?}: {:?}", their_id, err); | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment