diff --git a/src/lib.rs b/src/lib.rs index 2e174ca..cc45791 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,6 @@ mod serial_config; use numtoa::NumToA; -use core::convert::Infallible; use core::future::Future; use embassy_rp::bind_interrupts; @@ -37,7 +36,7 @@ impl Serial<'static> { pub fn new( usb: USB, serial_config: SerialConfig<'static>, - ) -> (Serial<'static>, impl Future) { + ) -> (Serial<'static>, impl Future) { // Create the driver, from the HAL. let driver = Driver::new(usb, Irqs); @@ -84,12 +83,10 @@ impl Serial<'static> { (Self { class }, Self::run_usb()) } - fn run_usb() -> impl Future { - unsafe { - async { - loop { - USB.as_mut().unwrap().run().await; - } + fn run_usb() -> impl Future { + async { + unsafe { + USB.as_mut().unwrap().run().await; } } }