Apply automatic clippy

This commit is contained in:
Natsu Kagami 2024-08-04 22:40:46 +02:00
parent 054a7d5862
commit b9f6fa7fb8
Signed by: nki
GPG key ID: 55A032EB38B49ADB
14 changed files with 49 additions and 43 deletions

View file

@ -192,7 +192,7 @@ pub async fn ranks(ctx: &Context, m: &Message) -> CommandResult {
}
let ranks = &ranks[start..end];
const HEADERS: [&'static str; 4] = ["Rank", "Rating", "Handle", "Username"];
const HEADERS: [&str; 4] = ["Rank", "Rating", "Handle", "Username"];
const ALIGNS: [Align; 4] = [Right, Right, Left, Left];
let ranks_arr = ranks
@ -354,11 +354,11 @@ pub(crate) async fn contest_rank_table(
if result.points > 0.0 {
p_results.push(format!("{}", result.points));
} else if result.best_submission_time_seconds.is_some() {
p_results.push(format!("{}", "?"));
p_results.push("?".to_string());
} else if result.rejected_attempt_count > 0 {
p_results.push(format!("-{}", result.rejected_attempt_count));
} else {
p_results.push(format!("{}", "----"));
p_results.push("----".to_string());
}
}