Skip to content

Commit

Permalink
codec.go: remove unnecessary cloneBytes for string
Browse files Browse the repository at this point in the history
  • Loading branch information
willgreenberg committed Jul 29, 2019
1 parent adaad0b commit 5d8cbb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ func (c *StringCodec) MarshalBinary() ([]byte, error) {
// UnmarshalBinary on a StringCodec sets the StringCodec to
// a stringified copy of the provided data
func (c *StringCodec) UnmarshalBinary(data []byte) error {
*c = StringCodec(cloneBytes(data))
*c = StringCodec(data)
return nil
}

0 comments on commit 5d8cbb0

Please sign in to comment.