1
Fork 0

Change the hashcounts in raw Lit variants from usize to u16.

This reduces the size of `Token` from 32 bytes to 24 bytes on 64-bit
platforms.
This commit is contained in:
Nicholas Nethercote 2018-04-12 19:50:53 +10:00
parent d26f9e42df
commit 4d34bfd00a
7 changed files with 19 additions and 14 deletions

View file

@ -72,9 +72,9 @@ pub enum Lit {
Integer(ast::Name),
Float(ast::Name),
Str_(ast::Name),
StrRaw(ast::Name, usize), /* raw str delimited by n hash symbols */
StrRaw(ast::Name, u16), /* raw str delimited by n hash symbols */
ByteStr(ast::Name),
ByteStrRaw(ast::Name, usize), /* raw byte str delimited by n hash symbols */
ByteStrRaw(ast::Name, u16), /* raw byte str delimited by n hash symbols */
}
impl Lit {