1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-07-01 00:44:26 +02:00

improve code readability

This commit is contained in:
Rob Ede
2021-01-04 00:49:02 +00:00
parent e1683313ec
commit 21f6c9d7a5
34 changed files with 238 additions and 230 deletions

View File

@ -184,7 +184,7 @@ impl Encoder<Message> for Codec {
}
}
},
Message::Nop => (),
Message::Nop => {},
}
Ok(())
}

View File

@ -125,7 +125,7 @@ impl Parser {
debug!("Received close frame with payload length exceeding 125. Morphing to protocol close frame.");
return Ok(Some((true, OpCode::Close, None)));
}
_ => (),
_ => {},
}
// unmask

View File

@ -222,7 +222,7 @@ mod test {
macro_rules! opcode_into {
($from:expr => $opcode:pat) => {
match OpCode::from($from) {
e @ $opcode => (),
e @ $opcode => {},
e => unreachable!("{:?}", e),
}
};
@ -232,7 +232,7 @@ mod test {
($from:expr => $opcode:pat) => {
let res: u8 = $from.into();
match res {
e @ $opcode => (),
e @ $opcode => {},
e => unreachable!("{:?}", e),
}
};