Tiny optimisation
This commit is contained in:
parent
2a4d9a85d5
commit
96ae960070
3 changed files with 6 additions and 1 deletions
|
|
@ -109,6 +109,10 @@ impl OpenedFile {
|
|||
size
|
||||
}
|
||||
|
||||
pub fn approx_is_finished(&self) -> bool {
|
||||
self.have.load(Ordering::Relaxed) == self.len
|
||||
}
|
||||
|
||||
pub fn iter_piece_priorities(&self) -> impl Iterator<Item = usize> {
|
||||
iter_piece_priorities(self.piece_range_usize())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue