flushing bitfield

This commit is contained in:
Igor Katson 2024-08-20 21:09:58 +01:00
parent bc9e72df60
commit 2fee0ca8c2
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
4 changed files with 54 additions and 12 deletions

View file

@ -185,6 +185,10 @@ impl ChunkTracker {
&*self.have
}
pub fn get_have_pieces_mut(&mut self) -> &mut dyn BitV {
&mut *self.have
}
pub fn reserve_needed_piece(&mut self, index: ValidPieceIndex) {
self.queue_pieces.set(index.get() as usize, false)
}