aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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,