mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 22:32:29 +00:00
Merge branch 'emb-storage-async-0p4' of https://github.com/Grus-BV/embassy into emb-storage-async-0p4
This commit is contained in:
commit
b1bc034a7e
@ -1197,6 +1197,7 @@ impl FirmwareWriter {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use core::convert::Infallible;
|
||||
|
||||
use embedded_storage::nor_flash::ErrorType;
|
||||
use embedded_storage_async::nor_flash::ReadNorFlash as AsyncReadNorFlash;
|
||||
use futures::executor::block_on;
|
||||
@ -1535,9 +1536,9 @@ mod tests {
|
||||
const READ_SIZE: usize = 1;
|
||||
|
||||
async fn read(&mut self, offset: u32, buf: &mut [u8]) -> Result<(), Self::Error> {
|
||||
let len = buf.len();
|
||||
buf[..].copy_from_slice(&self.0[offset as usize..offset as usize + len]);
|
||||
Ok(())
|
||||
let len = buf.len();
|
||||
buf[..].copy_from_slice(&self.0[offset as usize..offset as usize + len]);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn capacity(&self) -> usize {
|
||||
|
Loading…
Reference in New Issue
Block a user