mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +01:00
parent
4be7e5a812
commit
f46358878b
1 changed files with 1 additions and 1 deletions
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue