Skip to content

Commit c4305d0

Browse files
committed
spi: fix compiler warning
SpiBusFuture was never constructed.
1 parent 1ae5f3a commit c4305d0

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

src/eh1/spi.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -191,29 +191,6 @@ where
191191
type Error = spi::ErrorKind;
192192
}
193193

194-
#[derive(Default)]
195-
struct SpiBusFuture {
196-
awaited: bool,
197-
}
198-
199-
impl std::future::Future for SpiBusFuture {
200-
type Output = Result<(), spi::ErrorKind>;
201-
202-
fn poll(
203-
mut self: std::pin::Pin<&mut Self>,
204-
_cx: &mut std::task::Context<'_>,
205-
) -> std::task::Poll<Self::Output> {
206-
self.awaited = true;
207-
std::task::Poll::Ready(Ok(()))
208-
}
209-
}
210-
211-
impl Drop for SpiBusFuture {
212-
fn drop(&mut self) {
213-
assert!(self.awaited, "spi::flush call was not awaited");
214-
}
215-
}
216-
217194
impl<W> SpiBus<W> for Mock<W>
218195
where
219196
W: Copy + 'static + Debug + PartialEq,

0 commit comments

Comments
 (0)