Skip to content

Commit

Permalink
fixed for comparale
Browse files Browse the repository at this point in the history
  • Loading branch information
Code-Hex committed Feb 11, 2022
1 parent 25bfbcb commit 32a3d13
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ type Interface[K comparable, V any] interface {
}

var (
_ = []Interface[any, any]{
(*simple.Cache[any, any])(nil),
(*lru.Cache[any, any])(nil),
(*lfu.Cache[any, any])(nil),
(*fifo.Cache[any, any])(nil),
(*mru.Cache[any, any])(nil),
(*clock.Cache[any, any])(nil),
_ = []Interface[struct{}, any]{
(*simple.Cache[struct{}, any])(nil),
(*lru.Cache[struct{}, any])(nil),
(*lfu.Cache[struct{}, any])(nil),
(*fifo.Cache[struct{}, any])(nil),
(*mru.Cache[struct{}, any])(nil),
(*clock.Cache[struct{}, any])(nil),
}
)

Expand Down
2 changes: 1 addition & 1 deletion policy/lfu/priotiry_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func newPriorityQueue[K comparable, V any](cap int) *priorityQueue[K, V] {
}

// see example of priority queue: https://pkg.go.dev/container/heap
var _ heap.Interface = (*priorityQueue[interface{}, interface{}])(nil)
var _ heap.Interface = (*priorityQueue[struct{}, interface{}])(nil)

func (l priorityQueue[K, V]) Len() int { return len(l) }

Expand Down

0 comments on commit 32a3d13

Please sign in to comment.