From 3fefffae53563543c993e7b3c3722e7cd32207a9 Mon Sep 17 00:00:00 2001 From: Lofty Date: Mon, 25 Oct 2021 22:51:04 +0100 Subject: Derive Default for InstructionBundle --- src/lib.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 6315bdd..8891726 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], @@ -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] { -- cgit v1.1