diff --git a/trees/redblacktree/redblacktree.go b/trees/redblacktree/redblacktree.go index a8a496ec..f9c9bc91 100644 --- a/trees/redblacktree/redblacktree.go +++ b/trees/redblacktree/redblacktree.go @@ -72,6 +72,7 @@ func (tree *Tree) Put(key interface{}, value interface{}) { compare := tree.Comparator(key, node.Key) switch { case compare == 0: + node.Key = key node.Value = value return case compare < 0: