From 20332ccfb23b1d79fea99bfdba6f09246150a463 Mon Sep 17 00:00:00 2001 From: Martin Marmsoler Date: Sat, 16 Mar 2024 16:02:07 +0100 Subject: [PATCH] fix warnings --- src/blockdevice.rs | 8 ++++---- src/sdcard/mod.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/blockdevice.rs b/src/blockdevice.rs index f0c729d..286d578 100644 --- a/src/blockdevice.rs +++ b/src/blockdevice.rs @@ -40,16 +40,16 @@ pub trait BlockDevice { /// The errors that the `BlockDevice` can return. Must be debug formattable. type Error: core::fmt::Debug; /// Read one or more blocks, starting at the given block index. - async fn read( + fn read( &self, blocks: &mut [Block], start_block_idx: BlockIdx, reason: &str, - ) -> Result<(), Self::Error>; + ) -> impl core::future::Future>; /// Write one or more blocks, starting at the given block index. - async fn write(&self, blocks: &[Block], start_block_idx: BlockIdx) -> Result<(), Self::Error>; + fn write(&self, blocks: &[Block], start_block_idx: BlockIdx) -> impl core::future::Future>; /// Determine how many blocks this device can hold. - async fn num_blocks(&self) -> Result; + fn num_blocks(&self) -> impl core::future::Future>; } impl Block { diff --git a/src/sdcard/mod.rs b/src/sdcard/mod.rs index 965c076..fe6b13f 100644 --- a/src/sdcard/mod.rs +++ b/src/sdcard/mod.rs @@ -8,7 +8,7 @@ pub mod proto; use crate::{trace, Block, BlockCount, BlockDevice, BlockIdx}; -use core::{cell::RefCell, future::Future, pin::Pin}; +use core::cell::RefCell; use proto::*; // ****************************************************************************