Manually fix the rest of the lints

This commit is contained in:
Natsu Kagami 2024-02-17 20:37:43 +01:00
parent 508cf52e6f
commit 1125cac2a8
Signed by: nki
GPG key ID: 55A032EB38B49ADB
4 changed files with 39 additions and 46 deletions

View file

@ -192,10 +192,9 @@ pub async fn save(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult
let scores = client
.user_best(UserID::ID(u.id), |f| f.mode(*mode))
.await?;
match scores.into_iter().choose(&mut rand::thread_rng()) {
Some(v) => return Ok(Some((v, *mode))),
None => (),
};
if let Some(v) = scores.into_iter().choose(&mut rand::thread_rng()) {
return Ok(Some((v, *mode)));
}
}
Ok(None)
}