mirror of
https://codeberg.org/icewind/php-literal-parser.git
synced 2026-06-03 18:44:07 +02:00
clippy fixes
This commit is contained in:
parent
7f2ec876d8
commit
d1a1b7da81
1 changed files with 1 additions and 1 deletions
|
|
@ -54,7 +54,7 @@ fn parse_u32(
|
|||
mut result: u32,
|
||||
max: Option<u8>,
|
||||
) -> UnescapeResult<u32> {
|
||||
let mut max = max.unwrap_or(u8::max_value());
|
||||
let mut max = max.unwrap_or(u8::MAX);
|
||||
while let Some(digit) = s.peek().and_then(|digit| (digit as char).to_digit(radix)) {
|
||||
let _ = s.next(); // consume the digit we peeked
|
||||
result = result.checked_mul(radix).ok_or(UnescapeError)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue