From b83c9af73dc7955c4295f35c9bf5f0bacfea99b6 Mon Sep 17 00:00:00 2001 From: Lionarius Date: Wed, 26 Apr 2023 11:43:13 +0300 Subject: [PATCH] replace boundary check with range contains --- src/bot/commands/rating.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bot/commands/rating.rs b/src/bot/commands/rating.rs index 64c16d2..30d7f2f 100644 --- a/src/bot/commands/rating.rs +++ b/src/bot/commands/rating.rs @@ -126,7 +126,7 @@ impl MixerCommand for RatingCommand { .as_u64() .unwrap(); - if rating < 1 || rating > 5000 { + if !(1..=5000).contains(&rating) { interaction .create_interaction_response(ctx, |response| { response