Box<[u8]> instead of Vec<u8> for ByteBufOwned

This commit is contained in:
Igor Katson 2024-03-29 11:00:58 +00:00
parent 3cdf6d4cfc
commit fa05fe8376
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
24 changed files with 118 additions and 109 deletions

View file

@ -1,6 +1,6 @@
use std::{collections::HashMap, marker::PhantomData};
use buffers::{ByteBuf, ByteString};
use buffers::{ByteBuf, ByteBufOwned};
use clone_to_owned::CloneToOwned;
use serde::Deserializer;
@ -133,7 +133,7 @@ where
}
pub type BencodeValueBorrowed<'a> = BencodeValue<ByteBuf<'a>>;
pub type BencodeValueOwned = BencodeValue<ByteString>;
pub type BencodeValueOwned = BencodeValue<ByteBufOwned>;
#[cfg(test)]
mod tests {