Skip to content

Commit

Permalink
Avoid unnecessary conversions (#6178)
Browse files Browse the repository at this point in the history
Those values already have the right type.
  • Loading branch information
muesli authored and mkeeler committed Jul 19, 2019
1 parent 1366beb commit 61ff1d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion agent/txn_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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++
}
Expand Down
2 changes: 1 addition & 1 deletion command/kv/put/kv_put_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 61ff1d2

Please sign in to comment.