Move on_piece_completed() to a more appropriate place

This commit is contained in:
Igor Katson 2024-09-13 09:25:52 +01:00
parent 88c8e51ab8
commit 8974a013ce
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
2 changed files with 3 additions and 2 deletions

View file

@ -208,8 +208,6 @@ impl<'a> FileOps<'a> {
format!("error reading {to_read_in_file} bytes, file_id: {file_idx} (\"{name:?}\")")
})?;
self.files.on_piece_completed(piece_index)?;
piece_remaining_bytes -= to_read_in_file;
if piece_remaining_bytes == 0 {