diff --git a/src/main.rs b/src/main.rs index 9f5071c..995ac9b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,10 +31,10 @@ async fn main(_spawner: Spawner) { ) .await; - let usb_fut = MouseHID::run_usb().await; + let usb_future = MouseHID::run_usb().await; // Do stuff with the class! - let hid_fut = async { + let hid_future = async { loop { if let Some((x, y)) = mouse_sensor.read_movement().await { let report = MouseReport { @@ -52,5 +52,5 @@ async fn main(_spawner: Spawner) { // Run everything concurrently. // If we had made everything `'static` above instead, we could do this using separate tasks instead. - join(hid_fut, usb_fut).await; + join(hid_future, usb_future).await; } diff --git a/src/mouse_sensor/wrapper.rs b/src/mouse_sensor/wrapper.rs index 1d4bb18..ea58f6b 100644 --- a/src/mouse_sensor/wrapper.rs +++ b/src/mouse_sensor/wrapper.rs @@ -150,7 +150,7 @@ where (motion, x_overflow, y_overflow) } - pub async fn read_movement(&'d mut self) -> Option<(i8, i8)> { + pub async fn read_movement(&mut self) -> Option<(i8, i8)> { let (motion, x_overflow, y_overflow) = self.motion_detected().await; if motion {