diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-12-07 21:58:29 +0100 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2023-12-07 21:58:29 +0100 |
commit | 5e6df9a25be0523256abd45483603e334289aed3 (patch) | |
tree | 6703536819e0cc4078e42ca75bc64842ab9cdf2b /src/imm.rs | |
parent | 5c18f9267329e8eded611a830458ec07115e5670 (diff) | |
download | juicebox-asm-5e6df9a25be0523256abd45483603e334289aed3.tar.gz juicebox-asm-5e6df9a25be0523256abd45483603e334289aed3.zip |
clippy: fix some clippy lints
Diffstat (limited to 'src/imm.rs')
-rw-r--r-- | src/imm.rs | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -46,5 +46,18 @@ impl_imm!( ); impl_imm!( /// Type representing a 64 bit immediate. - Imm64, 8, from: { u64, i64, u32, i32, u16, i16, u8, i8 } + Imm64, 8, from: { u64, i64, u32, i32, u16, i16, u8, i8, usize, isize } ); + +#[cfg(test)] +mod test { + use super::*; + use std::mem::size_of; + + #[test] + fn test_usize_isize() { + // Imm64 should not implementd from usize/isize if this fails. + assert_eq!(size_of::<usize>(), size_of::<Imm64>()); + assert_eq!(size_of::<isize>(), size_of::<Imm64>()); + } +}
\ No newline at end of file |