Avoid unnecessary conversions (#6178)

Those values already have the right type.
This commit is contained in:
Christian Muehlhaeuser 2019-07-19 15:13:18 +02:00 committed by Matt Keeler
parent 1366bebf7f
commit 61ff1d20bf
2 changed files with 2 additions and 2 deletions

View File

@ -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++
}

View File

@ -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)
}
}