maidsafe / qp2p

peer-to-peer communications library for Rust based on QUIC protocol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

uses function newer than declared crate bytes

jonassmedegaard opened this issue · comments

qp2p has declared a dependency on bytes 1.0.1, but uses function BytesMut::zeroed available only since bytes 1.2.0.

Here's an error message from building against bytes 1.1.0:

error[E0599]: no function or associated item named `zeroed` found for struct `BytesMut` in the current scope
   --> /usr/share/cargo/registry/safe-network-0.71.1/debian/cargo_registry/qp2p-0.30.0/src/wire_msg.rs:122:31
    |
122 |                     BytesMut::zeroed(4).freeze(), // at least 4 bytes reserved here to aid deserialisation
    |                               ^^^^^^ function or associated item not found in `BytesMut`

error[E0599]: no function or associated item named `zeroed` found for struct `BytesMut` in the current scope
   --> /usr/share/cargo/registry/safe-network-0.71.1/debian/cargo_registry/qp2p-0.30.0/src/wire_msg.rs:123:31
    |
123 |                     BytesMut::zeroed(4).freeze(), // at least 4 bytes reserved here to aid deserialisation
    |                               ^^^^^^ function or associated item not found in `BytesMut`