Apply suggestion from @gballet

Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
This commit is contained in:
rjl493456442 2025-08-20 22:48:11 +08:00 committed by Gary Rong
parent ca8c82edce
commit d273d817cb

View file

@ -518,7 +518,7 @@ func (t *Trie) delete(n node, prefix, key []byte) (bool, node, error) {
// always creates a new slice) instead of append to // always creates a new slice) instead of append to
// avoid modifying n.Key since it might be shared with // avoid modifying n.Key since it might be shared with
// other nodes. // other nodes.
return true, &shortNode{slices.Concat(n.Key, child.Key...), child.Val, t.newFlag()}, nil return true, &shortNode{slices.Concat(n.Key, child.Key), child.Val, t.newFlag()}, nil
default: default:
return true, &shortNode{n.Key, child, t.newFlag()}, nil return true, &shortNode{n.Key, child, t.newFlag()}, nil
} }