1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-26 02:19:22 +02:00

clippy warnings

This commit is contained in:
Nikolay Kim
2018-07-05 13:16:16 +06:00
parent 05a43a855e
commit 8058d15624
4 changed files with 19 additions and 14 deletions

View File

@ -1007,22 +1007,22 @@ impl Protocol {
}
}
fn is_http(&self) -> bool {
match *self {
fn is_http(self) -> bool {
match self {
Protocol::Https | Protocol::Http => true,
_ => false,
}
}
fn is_secure(&self) -> bool {
match *self {
fn is_secure(self) -> bool {
match self {
Protocol::Https | Protocol::Wss => true,
_ => false,
}
}
fn port(&self) -> u16 {
match *self {
fn port(self) -> u16 {
match self {
Protocol::Http | Protocol::Ws => 80,
Protocol::Https | Protocol::Wss => 443,
}