From e8ce86df8b206c47ee170e122c900f7d64fbf9ac Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Sun, 3 Jul 2022 13:13:34 +0400 Subject: [PATCH] Clippy :| --- src/dispatching/update_listeners/webhooks.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dispatching/update_listeners/webhooks.rs b/src/dispatching/update_listeners/webhooks.rs index 828f2683..e68cdd90 100644 --- a/src/dispatching/update_listeners/webhooks.rs +++ b/src/dispatching/update_listeners/webhooks.rs @@ -170,7 +170,7 @@ fn check_secret(bytes: &[u8]) -> Result<&[u8], &'static str> { let len = bytes.len(); // Check that length is in bounds - if !(1 <= len && len <= 256) { + if !(1..=256).contains(&len) { return Err("secret token length must be in range 1..=256"); }