diff options
author | iximeow <me@iximeow.net> | 2021-10-25 15:13:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 15:13:03 -0700 |
commit | f32f478cbbdb8c4bb9d92754cb1f95ec64d0c1b7 (patch) | |
tree | b4198a2be2f786d0fedd0e33192f232128f596f0 | |
parent | fc2cf8fff5cd83b7fce82abd2b17ff55e83adf63 (diff) | |
parent | 3fefffae53563543c993e7b3c3722e7cd32207a9 (diff) |
Merge pull request #8 from iximeow/derive-default
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], @@ -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] { |