summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2021-10-25 15:13:03 -0700
committerGitHub <noreply@github.com>2021-10-25 15:13:03 -0700
commitf32f478cbbdb8c4bb9d92754cb1f95ec64d0c1b7 (patch)
treeb4198a2be2f786d0fedd0e33192f232128f596f0
parentfc2cf8fff5cd83b7fce82abd2b17ff55e83adf63 (diff)
parent3fefffae53563543c993e7b3c3722e7cd32207a9 (diff)
Merge pull request #8 from iximeow/derive-default
Derive Default for InstructionBundle
-rw-r--r--src/lib.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 36a892e..f199c92 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1266,7 +1266,7 @@ impl fmt::Display for Instruction {
Ok(())
}
}
-#[derive(Debug, PartialEq, Eq)]
+#[derive(Debug, Default, PartialEq, Eq)]
pub struct InstructionBundle {
bundle_tag: u8,
instructions: [Instruction; 3],
@@ -1357,14 +1357,6 @@ impl yaxpeax_arch::Instruction for InstructionBundle {
true
}
}
-impl Default for InstructionBundle {
- fn default() -> Self {
- InstructionBundle {
- bundle_tag: 0,
- instructions: Default::default(),
- }
- }
-}
impl fmt::Display for InstructionBundle {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let (stops, types) = if let Some((types, stops)) = BUNDLE_TAGS[self.bundle_tag as usize] {