Implement Borrow<[u8]> for ByteBuf types so they can be properly used in hashmaps

This commit is contained in:
Ivan 2024-08-18 11:40:04 +02:00
parent 1414a28aaf
commit 8dc8c1e35d
3 changed files with 20 additions and 17 deletions

View file

@ -215,7 +215,7 @@ impl PeerConnectionHandler for Handler {
None => anyhow::bail!("peer does not have metadata_size"),
};
if extended_handshake.get_msgid(b"ut_metadata").is_none() {
if extended_handshake.ut_metadata().is_none() {
anyhow::bail!("peer does not support ut_metadata");
}