diff options
Diffstat (limited to 'ayafs-core/src/memory')
-rw-r--r-- | ayafs-core/src/memory/cached_block.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ayafs-core/src/memory/cached_block.rs b/ayafs-core/src/memory/cached_block.rs index ae0f2a9..e4bcb2a 100644 --- a/ayafs-core/src/memory/cached_block.rs +++ b/ayafs-core/src/memory/cached_block.rs @@ -157,8 +157,7 @@ impl<T: Block> BlockCache<T> { if self.cache.contains(&block.index) { let mut data_block = convert::<U, T>(&block).clone(); data_block.dirty = true; // TODO 需要把显式写回的都标记为 dirty 吗 - let (entry, _value) = self.cache.push(block.index, data_block).unwrap(); - assert_eq!(entry, block.index); + self.cache.push(block.index, data_block).unwrap(); trace!("update_block(global_block_id: {})", block.index + self.global_offset); true } else { |