From 3837935c8ffee9149e980deaab9e0cf0caa42e4d Mon Sep 17 00:00:00 2001 From: Alex Martens Date: Mon, 25 Aug 2025 19:31:37 -0700 Subject: [PATCH] spi: fix compiler warning SpiBusFuture was never constructed. --- src/eh1/spi.rs | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/eh1/spi.rs b/src/eh1/spi.rs index fa4241f..8529dbd 100644 --- a/src/eh1/spi.rs +++ b/src/eh1/spi.rs @@ -191,29 +191,6 @@ where type Error = spi::ErrorKind; } -#[derive(Default)] -struct SpiBusFuture { - awaited: bool, -} - -impl std::future::Future for SpiBusFuture { - type Output = Result<(), spi::ErrorKind>; - - fn poll( - mut self: std::pin::Pin<&mut Self>, - _cx: &mut std::task::Context<'_>, - ) -> std::task::Poll { - self.awaited = true; - std::task::Poll::Ready(Ok(())) - } -} - -impl Drop for SpiBusFuture { - fn drop(&mut self) { - assert!(self.awaited, "spi::flush call was not awaited"); - } -} - impl SpiBus for Mock where W: Copy + 'static + Debug + PartialEq,