diff options
Diffstat (limited to 'embassy-embedded-hal/src/flash/partition/blocking.rs')
| -rw-r--r-- | embassy-embedded-hal/src/flash/partition/blocking.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-embedded-hal/src/flash/partition/blocking.rs b/embassy-embedded-hal/src/flash/partition/blocking.rs index 951998166..cb30290a8 100644 --- a/embassy-embedded-hal/src/flash/partition/blocking.rs +++ b/embassy-embedded-hal/src/flash/partition/blocking.rs | |||
| @@ -129,7 +129,7 @@ mod tests { | |||
| 129 | let mut read_buf = [0; 8]; | 129 | let mut read_buf = [0; 8]; |
| 130 | partition.read(4, &mut read_buf).unwrap(); | 130 | partition.read(4, &mut read_buf).unwrap(); |
| 131 | 131 | ||
| 132 | assert!(read_buf.iter().position(|&x| x != 0xAA).is_none()); | 132 | assert!(!read_buf.iter().any(|&x| x != 0xAA)); |
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | #[test] | 135 | #[test] |
| @@ -143,7 +143,7 @@ mod tests { | |||
| 143 | partition.write(4, &write_buf).unwrap(); | 143 | partition.write(4, &write_buf).unwrap(); |
| 144 | 144 | ||
| 145 | let flash = flash.into_inner().take(); | 145 | let flash = flash.into_inner().take(); |
| 146 | assert!(flash.mem[132..132 + 8].iter().position(|&x| x != 0xAA).is_none()); | 146 | assert!(!flash.mem[132..132 + 8].iter().any(|&x| x != 0xAA)); |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | #[test] | 149 | #[test] |
| @@ -156,6 +156,6 @@ mod tests { | |||
| 156 | partition.erase(0, 128).unwrap(); | 156 | partition.erase(0, 128).unwrap(); |
| 157 | 157 | ||
| 158 | let flash = flash.into_inner().take(); | 158 | let flash = flash.into_inner().take(); |
| 159 | assert!(flash.mem[128..256].iter().position(|&x| x != 0xFF).is_none()); | 159 | assert!(!flash.mem[128..256].iter().any(|&x| x != 0xFF)); |
| 160 | } | 160 | } |
| 161 | } | 161 | } |
