diff --git a/lib/rktk-drivers-common/src/usb/builder.rs b/lib/rktk-drivers-common/src/usb/builder.rs index 0ed7082..64034e5 100644 --- a/lib/rktk-drivers-common/src/usb/builder.rs +++ b/lib/rktk-drivers-common/src/usb/builder.rs @@ -9,7 +9,7 @@ use usbd_hid::descriptor::{ KeyboardReport, MediaKeyboardReport, MouseReport, SerializedDescriptor as _, }; -use crate::usb::handler::{UsbDeviceHandler, UsbRequestHandler}; +use crate::usb::handler::UsbDeviceHandler; use super::driver::CommonUsbDriver; use super::{task::*, ReadySignal}; diff --git a/lib/rktk-drivers-common/src/usb/handler.rs b/lib/rktk-drivers-common/src/usb/handler.rs index bbb6856..cb39831 100644 --- a/lib/rktk-drivers-common/src/usb/handler.rs +++ b/lib/rktk-drivers-common/src/usb/handler.rs @@ -21,7 +21,7 @@ impl UsbDeviceHandler { // 参考: https://www.itf.co.jp/tech/road-to-usb-master/usb-status impl Handler for UsbDeviceHandler { - fn enabled(&mut self, enabled: bool) { + fn enabled(&mut self, _enabled: bool) { self.configured.store(false, Ordering::Relaxed); SUSPENDED.store(false, Ordering::Release); } @@ -30,7 +30,7 @@ impl Handler for UsbDeviceHandler { self.configured.store(false, Ordering::Relaxed); } - fn addressed(&mut self, addr: u8) { + fn addressed(&mut self, _addr: u8) { self.configured.store(false, Ordering::Relaxed); } @@ -50,17 +50,17 @@ impl Handler for UsbDeviceHandler { pub struct UsbRequestHandler {} impl RequestHandler for UsbRequestHandler { - fn get_report(&mut self, id: ReportId, _buf: &mut [u8]) -> Option { + fn get_report(&mut self, _id: ReportId, _buf: &mut [u8]) -> Option { None } - fn set_report(&mut self, id: ReportId, data: &[u8]) -> OutResponse { + fn set_report(&mut self, _id: ReportId, _data: &[u8]) -> OutResponse { OutResponse::Accepted } - fn set_idle_ms(&mut self, id: Option, dur: u32) {} + fn set_idle_ms(&mut self, _id: Option, _dur: u32) {} - fn get_idle_ms(&mut self, id: Option) -> Option { + fn get_idle_ms(&mut self, _id: Option) -> Option { None } } diff --git a/lib/rktk-drivers-nrf/src/split/uart_full_duplex.rs b/lib/rktk-drivers-nrf/src/split/uart_full_duplex.rs index 4979c1d..4188439 100644 --- a/lib/rktk-drivers-nrf/src/split/uart_full_duplex.rs +++ b/lib/rktk-drivers-nrf/src/split/uart_full_duplex.rs @@ -23,7 +23,7 @@ impl<'d, I: UarteInstance, T: TimerInstance> UartFullDuplexSplitDriver<'d, I, T> impl SplitDriver for UartFullDuplexSplitDriver<'_, I, T> { type Error = UartFullDuplexSplitDriverError; - async fn wait_recv(&mut self, buf: &mut [u8], is_master: bool) -> Result<(), Self::Error> { + async fn wait_recv(&mut self, buf: &mut [u8], _is_master: bool) -> Result<(), Self::Error> { let mut i = 0; loop { let mut byte = [0]; @@ -42,7 +42,7 @@ impl SplitDriver for UartFullDuplexSplitDriv Ok(()) } - async fn send(&mut self, buf: &[u8], is_master: bool) -> Result<(), Self::Error> { + async fn send(&mut self, buf: &[u8], _is_master: bool) -> Result<(), Self::Error> { self.uarte .write_all(buf) .await diff --git a/tools/rktk-client/src/app/components/notification.rs b/tools/rktk-client/src/app/components/notification.rs index 04667a8..db7e4bf 100644 --- a/tools/rktk-client/src/app/components/notification.rs +++ b/tools/rktk-client/src/app/components/notification.rs @@ -2,6 +2,7 @@ use std::time::Duration; use dioxus::prelude::*; +#[allow(dead_code)] #[derive(Default)] pub enum NotificationLevel { #[default] @@ -35,7 +36,7 @@ struct NotificationData { record: Notification, } -static NOTFICATIONS: GlobalSignal> = GlobalSignal::new(|| vec![]); +static NOTFICATIONS: GlobalSignal> = GlobalSignal::new(Vec::new); static NOTIFICATION_ID: GlobalSignal = GlobalSignal::new(|| 0); pub fn push_notification(notification: Notification) {