forked from FreakU/watch-party
Fix clippy warnings & run cargo fmt
This commit is contained in:
parent
1f78f03b68
commit
24f5560d8d
|
@ -51,7 +51,7 @@ pub async fn ws_subscribe(session_uuid: Uuid, nickname: String, colour: String,
|
||||||
});
|
});
|
||||||
|
|
||||||
let mut colour = colour;
|
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");
|
colour = String::from("7ed0ff");
|
||||||
}
|
}
|
||||||
let nickname = truncate_str(&nickname, 50).to_string();
|
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 {
|
let event: WatchEventData = match event {
|
||||||
WatchEventData::SetTime { from: _, to } => WatchEventData::SetTime {
|
WatchEventData::SetTime { from: _, to } => WatchEventData::SetTime {
|
||||||
from: Some(session.get_time_ms()),
|
from: Some(session.get_time_ms()),
|
||||||
to: to,
|
to,
|
||||||
},
|
},
|
||||||
_ => event,
|
_ => event,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue