From e8ac96a06589b97fc9c686427ee265271c96b31b Mon Sep 17 00:00:00 2001 From: Aleksandr Trushkin Date: Fri, 19 Apr 2024 00:31:26 +0300 Subject: [PATCH] minor fix --- internal/common/xslices/lru.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/common/xslices/lru.go b/internal/common/xslices/lru.go index 208d2c3..cbdbd2b 100644 --- a/internal/common/xslices/lru.go +++ b/internal/common/xslices/lru.go @@ -36,7 +36,7 @@ func (l *lru[K, T]) Push(key K, value T) { node, ok := l.items[key] if ok { - l.bumpUnsafe(key, node) + l.bumpUnsafe(node) return } @@ -78,12 +78,12 @@ func (l *lru[K, T]) Get(key K) (T, bool) { } out := node.value - l.bumpUnsafe(key, node) + l.bumpUnsafe(node) return out, true } -func (l *lru[K, T]) bumpUnsafe(key K, node *lruNode[K, T]) { +func (l *lru[K, T]) bumpUnsafe(node *lruNode[K, T]) { if l.first == node { return }