Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
sverdlov93 committed Jul 17, 2024
1 parent 85d6ac8 commit 68d72e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lru/lru_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (c *cacheBase) RemoveOldest() {
func (c *cacheBase) removeElement(e *list.Element) {
c.ll.Remove(e)
kv, ok := e.Value.(*entry)
if !ok {
if ok {
delete(c.cache, kv.key)
if c.OnEvicted != nil {
c.OnEvicted(kv.key, kv.value)
Expand All @@ -114,7 +114,7 @@ func (c *cacheBase) Len() int {
func (c *cacheBase) Clear() {
for _, e := range c.cache {
kv, ok := e.Value.(*entry)
if !ok {
if ok {
if c.OnEvicted != nil {
c.OnEvicted(kv.key, kv.value)
}
Expand Down

0 comments on commit 68d72e1

Please sign in to comment.