Panic on unserializable packets
This commit is contained in:
parent
59eff03ae9
commit
cea0c2e847
1 changed files with 2 additions and 2 deletions
|
|
@ -43,8 +43,8 @@ impl fmt::Debug for ConnTx {
|
|||
|
||||
impl ConnTx {
|
||||
pub fn send(&self, packet: &Packet) -> Result<()> {
|
||||
let msg = Message::Text(serde_json::to_string(packet)?);
|
||||
self.tx.send(msg)?;
|
||||
let str = serde_json::to_string(packet).expect("unserializable packet");
|
||||
self.tx.send(Message::Text(str))?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue