aboutsummaryrefslogtreecommitdiff
path: root/embassy-boot
diff options
context:
space:
mode:
authorMehmet Ali Anil <[email protected]>2023-03-07 23:21:39 +0100
committerMehmet Ali Anil <[email protected]>2023-03-07 23:35:56 +0100
commitb1bc034a7e9127a604016dca7a82b7b4cb732432 (patch)
tree8c727e293186cf619ae75a174efa13a6aab09528 /embassy-boot
parent6bf8d090a19cba3b2458c9156e1007f6776d79d9 (diff)
parent4054fb8779acae214333ffef995e4e5547f49851 (diff)
Merge branch 'emb-storage-async-0p4' of https://github.com/Grus-BV/embassy into emb-storage-async-0p4
Diffstat (limited to 'embassy-boot')
-rw-r--r--embassy-boot/boot/src/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/embassy-boot/boot/src/lib.rs b/embassy-boot/boot/src/lib.rs
index 00cf2dfc6..0df44f36e 100644
--- a/embassy-boot/boot/src/lib.rs
+++ b/embassy-boot/boot/src/lib.rs
@@ -1197,6 +1197,7 @@ impl FirmwareWriter {
1197#[cfg(test)] 1197#[cfg(test)]
1198mod tests { 1198mod tests {
1199 use core::convert::Infallible; 1199 use core::convert::Infallible;
1200
1200 use embedded_storage::nor_flash::ErrorType; 1201 use embedded_storage::nor_flash::ErrorType;
1201 use embedded_storage_async::nor_flash::ReadNorFlash as AsyncReadNorFlash; 1202 use embedded_storage_async::nor_flash::ReadNorFlash as AsyncReadNorFlash;
1202 use futures::executor::block_on; 1203 use futures::executor::block_on;
@@ -1535,9 +1536,9 @@ mod tests {
1535 const READ_SIZE: usize = 1; 1536 const READ_SIZE: usize = 1;
1536 1537
1537 async fn read(&mut self, offset: u32, buf: &mut [u8]) -> Result<(), Self::Error> { 1538 async fn read(&mut self, offset: u32, buf: &mut [u8]) -> Result<(), Self::Error> {
1538 let len = buf.len(); 1539 let len = buf.len();
1539 buf[..].copy_from_slice(&self.0[offset as usize..offset as usize + len]); 1540 buf[..].copy_from_slice(&self.0[offset as usize..offset as usize + len]);
1540 Ok(()) 1541 Ok(())
1541 } 1542 }
1542 1543
1543 fn capacity(&self) -> usize { 1544 fn capacity(&self) -> usize {