Skip to content

Commit cb0019f

Browse files
committed
aumap: fix another key order bug
1 parent 007e178 commit cb0019f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/providers/file/aumap.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,14 @@ where
193193

194194
fn get(&self, key: K) -> Option<V> {
195195
let key = key.into();
196+
if let Some(val) = self.pending.get(&key) {
197+
return Some(V::from(*val));
198+
}
196199
self.dirty
197200
.iter()
198201
.chain(&self.on_disk)
199202
.rev()
200203
.find_map(|page| page.get(&key))
201-
.or_else(|| self.pending.get(&key))
202204
.copied()
203205
.map(V::from)
204206
}

0 commit comments

Comments
 (0)