Skip to content

Commit

Permalink
removed deepclone
Browse files Browse the repository at this point in the history
  • Loading branch information
absolutelightning committed Aug 17, 2024
1 parent 20408ec commit b0d66ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (t *RadixTree[T]) Txn() *Txn[T] {

// Clone makes an independent copy of the transaction. The new transaction
// does not track any nodes and has TrackMutate turned off. The cloned transaction will contain any uncommitted writes in the original transaction but further mutations to either will be independent and result in different radix trees on Commit. A cloned transaction may be passed to another goroutine and mutated there independently however each transaction may only be mutated in a single thread.
func (t *Txn[T]) Clone(deep bool) *Txn[T] {
func (t *Txn[T]) Clone() *Txn[T] {
// reset the writable node cache to avoid leaking future writes into the clone
newTree := &RadixTree[T]{
t.tree.root.clone(true),
Expand Down

0 comments on commit b0d66ad

Please sign in to comment.