From 5e6df9a25be0523256abd45483603e334289aed3 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Thu, 7 Dec 2023 21:58:29 +0100 Subject: clippy: fix some clippy lints --- src/imm.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/imm.rs') diff --git a/src/imm.rs b/src/imm.rs index 85b2cbc..ee51ae5 100644 --- a/src/imm.rs +++ b/src/imm.rs @@ -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::(), size_of::()); + assert_eq!(size_of::(), size_of::()); + } +} \ No newline at end of file -- cgit v1.2.3