summaryrefslogtreecommitdiff
path: root/ayafs-core/src/memory
diff options
context:
space:
mode:
authorChuyan Zhang <me@zcy.moe>2023-12-03 00:58:03 -0800
committerChuyan Zhang <me@zcy.moe>2023-12-03 00:58:03 -0800
commit07c1de41d975459397945f2e6b2b7f5630912175 (patch)
treee8e276a5627f13da255929d671badd0254541260 /ayafs-core/src/memory
parent21a9ce8e53224100f331d9a666bc00c630964724 (diff)
downloadmyfs-master.tar.gz
myfs-master.zip
remove some assertions...HEADmaster
Diffstat (limited to 'ayafs-core/src/memory')
-rw-r--r--ayafs-core/src/memory/cached_block.rs3
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 {