diff options
author | iximeow <me@iximeow.net> | 2019-10-20 03:29:59 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2020-01-12 16:10:13 -0800 |
commit | 579299dbc3dbd5a16fc777e2be3aeb6a47b705e7 (patch) | |
tree | 6a66cfc539d2f5cf2ce7b4bc208c6dda87e8370f | |
parent | 89e5f7fd44102db2df3ed30c36f714abbbbcc9ca (diff) |
small changes to prepare for Big Changes
-rw-r--r-- | src/lib.rs | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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::<RegSpec>(), 2); + assert_eq!(std::mem::size_of::<Operand>(), 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, |