We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d4c35b commit a117497Copy full SHA for a117497
drv/cosmo-hf/src/main.rs
@@ -367,8 +367,8 @@ impl FlashDriver {
367
// Manually construct the u32 instad of just `try_into`
368
// just in case this slice was an odd number of bytes
369
let mut v = [0u8; 4];
370
- for (i, b) in chunk.iter().enumerate() {
371
- v[i] = *b;
+ for (b, v_i) in chunk.iter().zip(v.iter_mut()) {
+ *v_i = *b;
372
}
373
let v = u32::from_le_bytes(v);
374
self.drv.tx_fifo_wdata.set_fifo_data(v);
0 commit comments