payload: always dereference NullPayload

There is no need in extra indirection level.
This commit is contained in:
Evgenii Stratonikov 2020-06-19 11:19:57 +03:00
parent 9f42108ef2
commit 505029152f

View file

@ -12,12 +12,12 @@ type NullPayload struct {
} }
// NewNullPayload returns zero-sized stub payload. // NewNullPayload returns zero-sized stub payload.
func NewNullPayload() *NullPayload { func NewNullPayload() NullPayload {
return &NullPayload{} return NullPayload{}
} }
// DecodeBinary implements Serializable interface. // DecodeBinary implements Serializable interface.
func (p *NullPayload) DecodeBinary(r *io.BinReader) {} func (p NullPayload) DecodeBinary(r *io.BinReader) {}
// EncodeBinary implements Serializable interface. // EncodeBinary implements Serializable interface.
func (p *NullPayload) EncodeBinary(w *io.BinWriter) {} func (p NullPayload) EncodeBinary(w *io.BinWriter) {}