-
Notifications
You must be signed in to change notification settings - Fork 258
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
What went wrong?
tendermint_proto::Protobuf::encode_vec() cannot fail since it uses a vector with required capacity and calls prost::Message::encode() which only fails if the input buffer doesn't have sufficient capacity.
fn encode_vec(&self) -> Result<Vec<u8>, Error> {
let mut wire = Vec::with_capacity(self.encoded_len());
self.encode(&mut wire).map(|_| wire)
}Definition of "done"
tendermint_proto::Protobuf::encode_vec() could simply return a Vec<u8> and unwrap() internally.
fn encode_vec(&self) -> Vec<u8> {
let mut wire = Vec::with_capacity(self.encoded_len());
self.encode(&mut wire).map(|_| wire).unwrap()
}Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working