From 447c577a2a2ae3071f21333e76a4ac3d89995316 Mon Sep 17 00:00:00 2001 From: Radical Date: Tue, 5 Aug 2025 03:28:35 +0200 Subject: [PATCH] style: cargo clippy & fmt --- src/objects/me.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objects/me.rs b/src/objects/me.rs index 0c54570..167e61e 100644 --- a/src/objects/me.rs +++ b/src/objects/me.rs @@ -284,7 +284,7 @@ impl Me { cache_pool: &redis::Client, new_status: i16, ) -> Result<(), Error> { - if new_status > 4 || new_status < 0 { + if !(0..=4).contains(&new_status) { return Err(Error::BadRequest("Invalid status code".to_string())); } self.online_status = new_status;