We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fbd6cb commit 242e05fCopy full SHA for 242e05f
src/blockdevice.rs
@@ -112,6 +112,7 @@ where
112
/// Read a block, and return a reference to it.
113
pub fn read(&mut self, block_idx: BlockIdx) -> Result<&Block, D::Error> {
114
if self.block_idx != Some(block_idx) {
115
+ self.block_idx = None;
116
self.block_device.read(&mut self.block, block_idx)?;
117
self.block_idx = Some(block_idx);
118
}
@@ -121,6 +122,7 @@ where
121
122
123
pub fn read_mut(&mut self, block_idx: BlockIdx) -> Result<&mut Block, D::Error> {
124
125
126
127
128
0 commit comments