Remove a redundant method

This commit is contained in:
Igor Katson 2024-03-30 14:12:54 +00:00
parent b42649a524
commit 2972b0c87b
3 changed files with 9 additions and 13 deletions

View file

@ -198,15 +198,6 @@ impl Lengths {
absolute_index,
})
}
pub fn chunk_info_from_received_piece(
&self,
index: u32,
begin: u32,
block_len: u32,
) -> Option<ChunkInfo> {
self.chunk_info_from_received_data(self.validate_piece_index(index)?, begin, block_len)
}
pub const fn chunk_range(&self, index: ValidPieceIndex) -> std::ops::Range<usize> {
let start = index.0 * self.chunks_per_piece;
let end = start + self.chunks_per_piece(index);