diff options
author | Lofty <dan.ravensloft@gmail.com> | 2021-10-25 22:51:04 +0100 |
---|---|---|
committer | Lofty <dan.ravensloft@gmail.com> | 2021-10-25 22:51:04 +0100 |
commit | 3fefffae53563543c993e7b3c3722e7cd32207a9 (patch) | |
tree | 36b4b93a4166f18df000fa08c42683ed2eeb9515 | |
parent | 95636fe37ebcbe77f37ab5cdfed55f20ffa882b2 (diff) |
Derive Default for InstructionBundle
-rw-r--r-- | src/lib.rs | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -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], @@ -1347,14 +1347,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] { |