Skip to content

Commit

Permalink
Fix deprecation in examples/lru.jl. Ref. JuliaLang#7332
Browse files Browse the repository at this point in the history
  • Loading branch information
jiahao committed Jun 22, 2014
1 parent b6ebf91 commit 0e12038
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/lru.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ end
function getindex(lru::LRU, key)
item = lru.ht[key]
idx = locate(lru.q, item)
delete!(lru.q, idx)
splice!(lru.q, idx)
unshift!(lru.q, item)
item.v
end
Expand All @@ -98,7 +98,7 @@ function setindex!(lru::LRU, v, key)
item = lru.ht[key]
idx = locate(lru.q, item)
item.v = v
delete!(lru.q, idx)
splice!(lru.q, idx)
else
item = CacheItem(key, v)
lru.ht[key] = item
Expand Down

0 comments on commit 0e12038

Please sign in to comment.