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 committed by Roman Khimov
parent 0510d1e6c1
commit 0d2bc8f4a6

View file

@ -248,9 +248,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
}