From 12cc668724e9236c46c34454adcf8c0343901f4a Mon Sep 17 00:00:00 2001 From: rootiest Date: Fri, 10 Apr 2026 15:04:47 -0400 Subject: [PATCH] chore: fix unused import and suppress dead_code for reserved protocol items MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove `warn` from keyboard.rs imports — it was never called there. Add #![allow(dead_code)] to protocol.rs since that module intentionally defines the full shared protocol up-front, including constants and constructors reserved for future features (numpad, active-app, ACK, FLAG_RESPONSE). Suppressing at the module level is cleaner than annotating each item individually. --- src/keyboard.rs | 2 +- src/protocol.rs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/keyboard.rs b/src/keyboard.rs index 7681dd3..02d56ab 100644 --- a/src/keyboard.rs +++ b/src/keyboard.rs @@ -15,7 +15,7 @@ use std::time::Duration; use anyhow::{Context, Result}; use hidapi::HidApi; -use log::{debug, error, info, trace, warn}; +use log::{debug, error, info, trace}; use crate::protocol::{Packet, PACKET_SIZE, USAGE_ID, USAGE_PAGE}; diff --git a/src/protocol.rs b/src/protocol.rs index 9b0e440..cef9210 100644 --- a/src/protocol.rs +++ b/src/protocol.rs @@ -1,6 +1,12 @@ // Copyright 2026 rootiest // SPDX-License-Identifier: GPL-3.0-or-later +// This module defines the complete shared protocol including constants and +// constructors reserved for future features (numpad, active-app, ACK). +// Suppressing dead_code here is intentional — these items will be used once +// the corresponding firmware and host features are implemented. +#![allow(dead_code)] + //! Shared Raw HID packet protocol. //! //! All constants and layout MUST match `hid_protocol.h` in the QMK keymap.