summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.golangci.yml1
-rw-r--r--lib/containers/rbtree.go8
2 files changed, 4 insertions, 5 deletions
diff --git a/.golangci.yml b/.golangci.yml
index afaf507..e8b7678 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -41,7 +41,6 @@ linters:
- nestif
- nlreturn
- nonamedreturns
- - predeclared
- revive
- stylecheck
- tagliatelle
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
}
}