From 24f5560d8d34de8fe4f46e14d0b85559c9432a4b Mon Sep 17 00:00:00 2001 From: videogame hacker Date: Tue, 15 Feb 2022 23:22:24 +0000 Subject: [PATCH] Fix clippy warnings & run cargo fmt --- src/viewer_connection.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/viewer_connection.rs b/src/viewer_connection.rs index fb62b02..ea38161 100644 --- a/src/viewer_connection.rs +++ b/src/viewer_connection.rs @@ -51,7 +51,7 @@ pub async fn ws_subscribe(session_uuid: Uuid, nickname: String, colour: String, }); let mut colour = colour; - if !colour.len() == 6 || !colour.chars().all(|x| x.is_ascii_hexdigit()) { + if colour.len() != 6 || !colour.chars().all(|x| x.is_ascii_hexdigit()) { colour = String::from("7ed0ff"); } let nickname = truncate_str(&nickname, 50).to_string(); @@ -92,7 +92,7 @@ pub async fn ws_subscribe(session_uuid: Uuid, nickname: String, colour: String, let event: WatchEventData = match event { WatchEventData::SetTime { from: _, to } => WatchEventData::SetTime { from: Some(session.get_time_ms()), - to: to, + to, }, _ => event, };