From 8cdf59b85571f913fd66d6e96663d1fcdd410828 Mon Sep 17 00:00:00 2001 From: awwsomepotato <153149335+awwsomepotato@users.noreply.github.com> Date: Wed, 16 Oct 2024 14:25:12 -0700 Subject: [PATCH] chore: remove unnecessary var --- src/query.rs | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/query.rs b/src/query.rs index db8641a..36b66c6 100644 --- a/src/query.rs +++ b/src/query.rs @@ -121,19 +121,20 @@ pub async fn get_pulse_data( - Local::now()) .num_seconds(); - let formated_time: String = match &queue_time { - 3600.. => { - format!("and will queue in {} hour(s)", queue_time / 3600) - } - 60..3600 => { - format!("and will be queue in {} minute(s)", queue_time / 60) - } - 30..60 => format!("and will queue in {} second(s)", queue_time), - ..30 => "is queueing NOW".to_string(), - }; format!( "Team {}'s next match is {} {}", - team_key, nexus_match.label, formated_time + team_key, + nexus_match.label, + match &queue_time { + 3600.. => { + format!("and will queue in {} hour(s)", queue_time / 3600) + } + 60..3600 => { + format!("and will be queue in {} minute(s)", queue_time / 60) + } + 30..60 => format!("and will queue in {} second(s)", queue_time), + ..30 => "is queueing NOW".to_string(), + } ) } else { format!(