cleanup unnecessary dereference

pull/72/head
Naja Melan 5 years ago
parent 2e72b562ce
commit bf63a71cd1
  1. 4
      src/protocol/mod.rs

@ -550,7 +550,7 @@ enum WebSocketState {
impl WebSocketState {
/// Tell if we're allowed to process normal messages.
fn is_active(&self) -> bool {
match *self {
match self {
WebSocketState::Active => true,
_ => false,
}
@ -560,7 +560,7 @@ impl WebSocketState {
/// but the remote hasn't confirmed, they might have sent data before they receive our
/// close frame, so we should still pass those to client code, hence ClosedByUs is valid.
fn can_read(&self) -> bool {
match *self {
match self {
WebSocketState::Active |
WebSocketState::ClosedByUs => true,
_ => false,

Loading…
Cancel
Save