mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-05-24 09:10:49 +00:00
Manually fix the rest of the lints
This commit is contained in:
parent
508cf52e6f
commit
1125cac2a8
4 changed files with 39 additions and 46 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue