1
Fork 0
rust/library/core
okaneco 31c758e052 net: Add branch to Parser::read_number for parsing without checked
arithmetic

If `max_digits.is_some()`, then we know we are parsing a `u8` or `u16`
because `read_number` is only called with `Some(3)` or `Some(4)`. Both
types fit well within a `u32` without risk of overflow. Thus, we can use
plain arithmetic to avoid extra instructions from `checked_mul` and
`checked_add`.
2024-03-04 18:46:09 -05:00
..
benches Auto merge of #85528 - the8472:iter-markers, r=dtolnay 2024-01-21 11:17:46 +00:00
src net: Add branch to Parser::read_number for parsing without checked 2024-03-04 18:46:09 -05:00
tests rename ptr::invalid -> ptr::without_provenance 2024-02-21 20:15:52 +01:00
Cargo.toml Update rand in the stdlib tests, and remove the getrandom feature from it 2023-01-04 14:52:41 -08:00