From 2ef5124a2d305f3bab7d77cb4d9e1e20ae60174d Mon Sep 17 00:00:00 2001 From: Igor Katson Date: Fri, 29 Mar 2024 20:15:25 +0000 Subject: [PATCH] Nothing --- crates/librqbit/src/tests/e2e.rs | 1 + crates/librqbit_core/src/lengths.rs | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/crates/librqbit/src/tests/e2e.rs b/crates/librqbit/src/tests/e2e.rs index f7bfd59..3920709 100644 --- a/crates/librqbit/src/tests/e2e.rs +++ b/crates/librqbit/src/tests/e2e.rs @@ -105,6 +105,7 @@ async fn test_e2e() { } Ok(true) } + crate::ManagedTorrentState::Error(e) => bail!("error: {e:?}"), _ => bail!("broken state"), }) .unwrap(); diff --git a/crates/librqbit_core/src/lengths.rs b/crates/librqbit_core/src/lengths.rs index 63a083c..7b7fac0 100644 --- a/crates/librqbit_core/src/lengths.rs +++ b/crates/librqbit_core/src/lengths.rs @@ -25,9 +25,15 @@ pub struct PieceInfo { #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub struct ChunkInfo { pub piece_index: ValidPieceIndex, + + // Index of chunk within the piece. pub chunk_index: u32, + + // Absolute chunk index if the first chunk of the first piece was 0. pub absolute_index: u32, pub size: u32, + + // Offset of chunk in bytes within the piece. pub offset: u32, }