network: remove extra error check from Message.Encode()

Buffer write error is returned from `Encode()`.
This commit is contained in:
Evgenii Stratonikov 2020-12-04 15:00:20 +03:00
parent 63aebfeae3
commit 2dcd366ef9

View file

@ -196,9 +196,6 @@ func (m *Message) Bytes() ([]byte, error) {
if err := m.Encode(w.BinWriter); err != nil {
return nil, err
}
if w.Err != nil {
return nil, w.Err
}
return w.Bytes(), nil
}