Skip to content

Commit a117497

Browse files
labbotthawkw
andauthored
Update drv/cosmo-hf/src/main.rs
Co-authored-by: Eliza Weisman <[email protected]>
1 parent 2d4c35b commit a117497

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drv/cosmo-hf/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ impl FlashDriver {
367367
// Manually construct the u32 instad of just `try_into`
368368
// just in case this slice was an odd number of bytes
369369
let mut v = [0u8; 4];
370-
for (i, b) in chunk.iter().enumerate() {
371-
v[i] = *b;
370+
for (b, v_i) in chunk.iter().zip(v.iter_mut()) {
371+
*v_i = *b;
372372
}
373373
let v = u32::from_le_bytes(v);
374374
self.drv.tx_fifo_wdata.set_fifo_data(v);

0 commit comments

Comments
 (0)