Use u32 in Type API (#4280)

Move from passing and returning u8 and u16 values to u32 in many of
the functions. This removes a number of type conversions and gives
a small compilation time speedup, around ~0.7% on my aarch64 machine.

Copyright (c) 2022, Arm Limited.
This commit is contained in:
Sam Parker
2022-06-30 20:43:36 +01:00
committed by GitHub
parent 95836ba114
commit a2d49ebf27
13 changed files with 27 additions and 28 deletions

View File

@@ -381,7 +381,7 @@ impl<'a> Lexer<'a> {
};
if is_vector {
if number <= u32::from(u16::MAX) {
base_type.by(number as u16).map(Token::Type)
base_type.by(number).map(Token::Type)
} else {
None
}