diff options
| author | okaneco <47607823+okaneco@users.noreply.github.com> | 2024-02-21 21:44:30 -0500 |
|---|---|---|
| committer | okaneco <47607823+okaneco@users.noreply.github.com> | 2024-03-04 18:46:09 -0500 |
| commit | 31c758e052e98f387b6de008238023afa0309c53 (patch) | |
| tree | 152b8847ff740b10bfc9211aab7731ebf77007da /compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp | |
| parent | 3406ada96f8e16e49e947a91db3eba0db45245fa (diff) | |
| download | rust-31c758e052e98f387b6de008238023afa0309c53.tar.gz rust-31c758e052e98f387b6de008238023afa0309c53.zip | |
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`.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
