Use MemFlash::default() in sha1 verify test

This commit is contained in:
Rasmus Melchior Jacobsen 2023-04-04 19:07:45 +02:00
parent 54b82d9966
commit 8256ac1044

View File

@ -519,14 +519,14 @@ mod tests {
use sha1::{Digest, Sha1}; use sha1::{Digest, Sha1};
use super::*; use super::*;
use crate::tests::MemFlash; use crate::mem_flash::MemFlash;
#[test] #[test]
fn can_verify() { fn can_verify_sha1() {
const STATE: Partition = Partition::new(0, 4096); const STATE: Partition = Partition::new(0, 4096);
const DFU: Partition = Partition::new(65536, 131072); const DFU: Partition = Partition::new(65536, 131072);
let mut flash = MemFlash::<131072, 4096, 8>([0xFF; 131072]); let mut flash = MemFlash::<131072, 4096, 8>::default();
let update = [0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66]; let update = [0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66];
let mut to_write = [0; 4096]; let mut to_write = [0; 4096];