diff options
author | Eduardo Broto <ebroto@tutanota.com> | 2019-12-07 21:24:57 +0100 |
---|---|---|
committer | Eduardo Broto <ebroto@tutanota.com> | 2019-12-07 22:38:01 +0100 |
commit | 9e6f390c1f34de0d0b413f4704fc2d1f655c47bc (patch) | |
tree | 089b711721a9c4aac2e461a2fa7211d7ba5de266 /src/network/connection.rs | |
parent | 423c6a52ba84c27b8667a762ee33bc28f44f0e37 (diff) |
chore(style): fix clippy errors
Diffstat (limited to 'src/network/connection.rs')
-rw-r--r-- | src/network/connection.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/connection.rs b/src/network/connection.rs index 75edf86..f931d54 100644 --- a/src/network/connection.rs +++ b/src/network/connection.rs @@ -11,8 +11,8 @@ pub enum Protocol { } impl Protocol { - pub fn from_string(string: &String) -> Option<Self> { - match string.as_str() { + pub fn from_str(string: &str) -> Option<Self> { + match string { "TCP" => Some(Protocol::Tcp), "UDP" => Some(Protocol::Udp), _ => None, |