From b0e665f5436e08e4fd7446a59b87ac28f562a601 Mon Sep 17 00:00:00 2001 From: troido Date: Sun, 9 Feb 2020 23:54:24 +0100 Subject: refactoring using cargo clippy --- src/gameserver.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gameserver.rs') diff --git a/src/gameserver.rs b/src/gameserver.rs index c7c5062..d7b2ccd 100644 --- a/src/gameserver.rs +++ b/src/gameserver.rs @@ -183,10 +183,10 @@ fn parse_message(msg: &str) -> Message { Message::Input(arr[1].clone()) } _ => { - Message::Invalid(format!("unknown messsage type {:?}", msgtype).to_string()) + Message::Invalid(format!("unknown messsage type {:?}", msgtype)) } } - } else { Message::Invalid(format!("first array value not string: {:?}", arr[0].to_string()).to_string()) } + } else { Message::Invalid(format!("first array value not string: {:?}", arr[0].to_string())) } } else { Message::Invalid("not json array".to_string()) } } else { Message::Invalid("not json message".to_string()) } } -- cgit