mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-24 23:57:38 +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();
|
let len = bytes.len();
|
||||||
|
|
||||||
// Check that length is in bounds
|
// 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");
|
return Err("secret token length must be in range 1..=256");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue