From 0c706b6ad52776430ac15cf0e286dd473091d93e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 1 Jan 2023 21:14:26 -0700 Subject: lint: Turn on predeclared --- lib/containers/rbtree.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/containers') diff --git a/lib/containers/rbtree.go b/lib/containers/rbtree.go index f922a7b..0430123 100644 --- a/lib/containers/rbtree.go +++ b/lib/containers/rbtree.go @@ -391,10 +391,10 @@ func (t *RBTree[K, V]) Insert(val V) { t.root.Color = Black } -func (t *RBTree[K, V]) transplant(old, new *RBNode[V]) { - *t.parentChild(old) = new - if new != nil { - new.Parent = old.Parent +func (t *RBTree[K, V]) transplant(oldNode, newNode *RBNode[V]) { + *t.parentChild(oldNode) = newNode + if newNode != nil { + newNode.Parent = oldNode.Parent } } -- cgit v1.2.3-2-g168b