Skip to content

Commit

Permalink
Refactor deep copy code
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasz-antoniak committed Jun 19, 2024
1 parent 9ac4864 commit 8235474
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/datastax/cql-proxy

go 1.16
go 1.18

require (
github.com/alecthomas/kong v0.2.17
Expand Down
6 changes: 3 additions & 3 deletions proxy/codecs.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ func (m *partialExecute) GetOpCode() primitive.OpCode {
}

func (m *partialExecute) DeepCopyMessage() message.Message {
return &partialExecute{
queryId: append(m.queryId[:0:0], m.queryId...),
}
queryId := make([]byte, len(m.queryId))
copy(queryId, m.queryId)
return &partialExecute{queryId}
}

func (m *partialExecute) String() string {
Expand Down

0 comments on commit 8235474

Please sign in to comment.