Skip to content

Commit

Permalink
refactor(cache): update deprecated DCons call sites
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Jul 17, 2022
1 parent 2dfec21 commit 2bbacf7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cache/src/mru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class MRUCache<K, V> extends LRUCache<K, V> {
e.value.s = s;
this.items.asHead(e);
} else {
this.items.cons({ k, v, s });
this.items.prepend({ k, v, s });
this.map.set(k, this.items.head!);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/ecs/src/caches/lru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class LRU<T> implements ICache<T> {
node.value.v = val;
items.asHead(node);
} else {
items.cons({ k: key, v: val });
items.prepend({ k: key, v: val });
index.set(key, items.head!);
while (items.length > this.capacity) {
this.index.delete(this.items.pop()!.k);
Expand Down

0 comments on commit 2bbacf7

Please sign in to comment.