From 61ff1d20bf026fa4e084a870d7b94eef1eef9262 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Fri, 19 Jul 2019 15:13:18 +0200 Subject: [PATCH] Avoid unnecessary conversions (#6178) Those values already have the right type. --- agent/txn_endpoint.go | 2 +- command/kv/put/kv_put_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/txn_endpoint.go b/agent/txn_endpoint.go index d02baf775a..f47ff3c294 100644 --- a/agent/txn_endpoint.go +++ b/agent/txn_endpoint.go @@ -135,7 +135,7 @@ func (s *HTTPServer) convertOps(resp http.ResponseWriter, req *http.Request) (st } netKVSize += size - verb := api.KVOp(in.KV.Verb) + verb := in.KV.Verb if isWrite(verb) { writes++ } diff --git a/command/kv/put/kv_put_test.go b/command/kv/put/kv_put_test.go index 86d4cb2257..0a3058ba5f 100644 --- a/command/kv/put/kv_put_test.go +++ b/command/kv/put/kv_put_test.go @@ -165,7 +165,7 @@ func TestKVPutCommand_Base64(t *testing.T) { t.Fatal(err) } - if !bytes.Equal(data.Value, []byte(expected)) { + if !bytes.Equal(data.Value, expected) { t.Errorf("bad: %#v, %s", data.Value, data.Value) } }