mirror of https://github.com/status-im/consul.git
Avoid unnecessary conversions (#6178)
Those values already have the right type.
This commit is contained in:
parent
1366bebf7f
commit
61ff1d20bf
|
@ -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++
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue