I can now download torrent metainfo from peers!!

This commit is contained in:
Igor Katson 2021-07-02 17:58:53 +01:00
parent 302e95649d
commit 48dcf2d1bd
5 changed files with 258 additions and 143 deletions

View file

@ -2,10 +2,10 @@ use serde::{Deserialize, Deserializer};
use crate::clone_to_owned::CloneToOwned;
#[derive(PartialEq, Eq, Hash, Clone)]
#[derive(Default, PartialEq, Eq, Hash, Clone, PartialOrd, Ord)]
pub struct ByteString(pub Vec<u8>);
#[derive(Deserialize, PartialEq, Eq, Hash, Clone)]
#[derive(Default, Deserialize, PartialEq, Eq, Hash, Clone, PartialOrd, Ord)]
#[serde(transparent)]
pub struct ByteBuf<'a>(pub &'a [u8]);