From ae4fb433aef33cfc7993516f880de85d87fa37d8 Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Mon, 15 Apr 2024 19:53:46 +0200 Subject: usb-hid: all the RequestHandler method accept &mut self --- embassy-usb/src/class/hid.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'embassy-usb/src') diff --git a/embassy-usb/src/class/hid.rs b/embassy-usb/src/class/hid.rs index 7d27c2578..6d9e0aced 100644 --- a/embassy-usb/src/class/hid.rs +++ b/embassy-usb/src/class/hid.rs @@ -378,7 +378,7 @@ pub trait RequestHandler { /// Reads the value of report `id` into `buf` returning the size. /// /// Returns `None` if `id` is invalid or no data is available. - fn get_report(&self, id: ReportId, buf: &mut [u8]) -> Option { + fn get_report(&mut self, id: ReportId, buf: &mut [u8]) -> Option { let _ = (id, buf); None } @@ -394,7 +394,7 @@ pub trait RequestHandler { /// If `id` is `None`, get the idle rate for all reports. Returning `None` /// will reject the control request. Any duration at or above 1.024 seconds /// or below 4ms will be returned as an indefinite idle rate. - fn get_idle_ms(&self, id: Option) -> Option { + fn get_idle_ms(&mut self, id: Option) -> Option { let _ = id; None } @@ -403,7 +403,7 @@ pub trait RequestHandler { /// /// If `id` is `None`, set the idle rate of all input reports to `dur`. If /// an indefinite duration is requested, `dur` will be set to `u32::MAX`. - fn set_idle_ms(&self, id: Option, duration_ms: u32) { + fn set_idle_ms(&mut self, id: Option, duration_ms: u32) { let _ = (id, duration_ms); } } -- cgit