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 2c836db commit 83831c0Copy full SHA for 83831c0
src/blockdevice.rs
@@ -140,9 +140,7 @@ where
140
/// Access a blank sector
141
pub fn blank_mut(&mut self, block_idx: BlockIdx) -> &mut Block {
142
self.block_idx = Some(block_idx);
143
- for b in self.block[0].iter_mut() {
144
- *b = 0;
145
- }
+ self.block[0].fill(0);
146
&mut self.block[0]
147
}
148
src/sdcard/mod.rs
@@ -341,9 +341,7 @@ where
341
return Err(Error::ReadError);
342
343
344
- for b in buffer.iter_mut() {
345
- *b = 0xFF;
346
+ buffer.fill(0xFF);
347
self.transfer_bytes(buffer)?;
348
349
// These two bytes are always sent. They are either a valid CRC, or
0 commit comments