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

This reverts commit deee41cd93.
This commit is contained in:
Igor Katson 2024-03-29 13:00:57 +00:00
parent e862d34cb4
commit f42de46878
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
23 changed files with 124 additions and 106 deletions

View file

@ -35,7 +35,7 @@ pub struct ChunkTracker {
fn compute_chunk_status(lengths: &Lengths, needed_pieces: &BF) -> BF {
let required_size = lengths.chunk_bitfield_bytes();
let vec = vec![0u8; required_size];
let mut chunk_bf = BF::from_boxed_slice(vec.into_boxed_slice());
let mut chunk_bf = BF::from_vec(vec);
for piece_index in needed_pieces
.get(0..lengths.total_pieces() as usize)
.unwrap()