From 579299dbc3dbd5a16fc777e2be3aeb6a47b705e7 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 20 Oct 2019 03:29:59 -0700 Subject: small changes to prepare for Big Changes --- src/lib.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index ded6f1d..010b0ea 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -230,7 +230,7 @@ impl Operand { false } Operand::Many(els) => { - for el in els { + for el in els.iter() { if el.is_memory() { return true; } @@ -242,6 +242,12 @@ impl Operand { } } +#[test] +fn operand_size() { + assert_eq!(std::mem::size_of::(), 2); + assert_eq!(std::mem::size_of::(), 3); +} + #[allow(non_camel_case_types)] #[cfg(feature="use-serde")] #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash, Serialize, Deserialize)] @@ -712,7 +718,7 @@ impl PrefixRex { } #[allow(non_camel_case_types)] -#[derive(Copy, Clone, Debug)] +#[derive(Copy, Clone, Debug, PartialEq)] pub enum OperandCode { Eb_Gb, Ev_Gv, -- cgit v1.1