small match statement syntax improvement

This commit is contained in:
Toshit Chawda 2024-07-15 22:22:51 -07:00
parent b290d3b583
commit 314c1bfa75
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D

View file

@ -194,11 +194,7 @@ impl WebSocketWrite for WebSocketWrapper {
return Err(WispError::WsImplSocketClosed); return Err(WispError::WsImplSocketClosed);
} }
match frame.opcode { match frame.opcode {
Binary => self Binary | Text => self
.inner
.send_with_u8_array(&frame.payload)
.map_err(|_| WebSocketError::SendFailed.into()),
Text => self
.inner .inner
.send_with_u8_array(&frame.payload) .send_with_u8_array(&frame.payload)
.map_err(|_| WebSocketError::SendFailed.into()), .map_err(|_| WebSocketError::SendFailed.into()),