codestyle: redundant type conversion

This commit is contained in:
Vsevolod Brekelov 2019-10-18 18:39:31 +03:00
parent 1afdb895a1
commit fe39c565b9
3 changed files with 3 additions and 3 deletions

View file

@ -17,7 +17,7 @@ func TestEncodeDecodeContract(t *testing.T) {
assert.Equal(t, ContractType, tx.Type)
assert.IsType(t, tx.Data, &ContractTX{})
assert.Equal(t, 0, int(tx.Version))
assert.Equal(t, 1, int(len(tx.Inputs)))
assert.Equal(t, 1, len(tx.Inputs))
input := tx.Inputs[0]

View file

@ -85,7 +85,7 @@ func emitSyscall(w *bytes.Buffer, api string) error {
}
buf := make([]byte, len(api)+1)
buf[0] = byte(len(api))
copy(buf[1:], []byte(api))
copy(buf[1:], api)
return emit(w, vm.SYSCALL, buf)
}

View file

@ -91,7 +91,7 @@ func EmitSyscall(w *bytes.Buffer, api string) error {
}
buf := make([]byte, len(api)+1)
buf[0] = byte(len(api))
copy(buf[1:], []byte(api))
copy(buf[1:], api)
return Emit(w, SYSCALL, buf)
}