aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2019-10-20 03:29:59 -0700
committeriximeow <me@iximeow.net>2020-01-12 16:10:13 -0800
commit579299dbc3dbd5a16fc777e2be3aeb6a47b705e7 (patch)
tree6a66cfc539d2f5cf2ce7b4bc208c6dda87e8370f /src
parent89e5f7fd44102db2df3ed30c36f714abbbbcc9ca (diff)
small changes to prepare for Big Changes
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs10
1 files changed, 8 insertions, 2 deletions
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::<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,