From 63597a96ec0ad9e6d43c3fc81e809909e0237461 Mon Sep 17 00:00:00 2001 From: "Iskander (Alex) Sharipov" Date: Mon, 28 Jan 2019 21:11:30 +0300 Subject: [PATCH] remove excessive []byte(s) conversion (#143) `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 --- node_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node_test.go b/node_test.go index a7b0d97..33312bc 100644 --- a/node_test.go +++ b/node_test.go @@ -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{}