fix(miniprotocols): Decode BlockContent correctly (#60)
This commit is contained in:
parent
fafd31fcc6
commit
8cb012cdc1
1 changed files with 2 additions and 1 deletions
|
|
@ -166,7 +166,8 @@ impl EncodePayload for HeaderContent {
|
||||||
impl DecodePayload for BlockContent {
|
impl DecodePayload for BlockContent {
|
||||||
fn decode_payload(d: &mut crate::PayloadDecoder) -> Result<Self, Box<dyn std::error::Error>> {
|
fn decode_payload(d: &mut crate::PayloadDecoder) -> Result<Self, Box<dyn std::error::Error>> {
|
||||||
d.tag()?;
|
d.tag()?;
|
||||||
Ok(BlockContent(d.decode()?))
|
let bytes = d.bytes()?;
|
||||||
|
Ok(BlockContent(Vec::from(bytes)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue