diff --git a/src/maybe_future.rs b/src/maybe_future.rs index cb56d19..30affbf 100644 --- a/src/maybe_future.rs +++ b/src/maybe_future.rs @@ -106,7 +106,7 @@ pub mod blocking { } #[cfg(not(any(feature = "smol", feature = "tokio")))] - fn spawn(f: impl FnOnce() -> R + Send + 'static) -> Self { + fn spawn(_f: impl FnOnce() -> R + Send + 'static) -> Self { panic!("Awaiting blocking syscall without an async runtime: enable the `smol` or `tokio` feature of nusb."); } } diff --git a/src/platform/linux_usbfs/device.rs b/src/platform/linux_usbfs/device.rs index c86ac34..4360f90 100644 --- a/src/platform/linux_usbfs/device.rs +++ b/src/platform/linux_usbfs/device.rs @@ -551,7 +551,7 @@ fn request_configuration(fd: &OwnedFd) -> Result { Ok(1) => { let active_config = dst[0]; debug!("Obtained active configuration for fd {} from GET_CONFIGURATION request: {active_config}", fd.as_raw_fd()); - return Ok(active_config); + Ok(active_config) } Ok(n) => { warn!("GET_CONFIGURATION request returned unexpected length: {n}, expected 1");