Skip to content

Commit

Permalink
remove excessive []byte(s) conversion (#143)
Browse files Browse the repository at this point in the history
`copy` permits using to mix `[]byte` and `string` arguments without
explicit conversion. I removed explicit conversion to make the code simpler.

Signed-off-by: Iskander Sharipov <[email protected]>
  • Loading branch information
quasilyte authored and xiang90 committed Jan 28, 2019
1 parent 8693da9 commit 63597a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ func TestNode_read_LeafPage(t *testing.T) {

// Write data for the nodes at the end.
data := (*[4096]byte)(unsafe.Pointer(&nodes[2]))
copy(data[:], []byte("barfooz"))
copy(data[7:], []byte("helloworldbye"))
copy(data[:], "barfooz")
copy(data[7:], "helloworldbye")

// Deserialize page into a leaf.
n := &node{}
Expand Down

0 comments on commit 63597a9

Please sign in to comment.