diff --git a/macros/src/lib.rs b/macros/src/lib.rs index 6c2ae43..85dadab 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -229,7 +229,7 @@ pub fn gen_hid_descriptor(args: TokenStream, input: TokenStream) -> TokenStream let (descriptor, fields) = output; let mut out = quote! { - #[derive(Debug, Clone, Copy)] + #[derive(Debug, Clone, Copy, Default, Eq, PartialEq)] #[repr(C, packed)] #decl diff --git a/src/descriptor.rs b/src/descriptor.rs index 833c680..7b6ea62 100644 --- a/src/descriptor.rs +++ b/src/descriptor.rs @@ -83,17 +83,6 @@ pub struct KeyboardReport { pub keycodes: [u8; 6], } -impl KeyboardReport { - pub const fn default() -> Self { - Self { - modifier: 0, - reserved: 0, - leds: 0, - keycodes: [0u8; 6], - } - } -} - /// KeyboardUsage describes the key codes to be used in implementing a USB keyboard. /// /// The usage type of all key codes is Selectors, except for the modifier keys