fix: fixes according to PR comments

- Reset previous implementation of InMemoryExampleStorage
- Implement default (empty) behaviour of on_piece_completed in trait
  itself
- Now passing a ValidPieceIndex in on_piece_completed
This commit is contained in:
LIAUD Corentin 2024-08-28 08:26:06 +02:00
parent 35d57ae8a2
commit 9183df0ebd
No known key found for this signature in database
GPG key ID: 48D3490FB1A44E6A
6 changed files with 19 additions and 79 deletions

View file

@ -57,10 +57,6 @@ impl TorrentStorage for CustomStorage {
fn init(&mut self, _meta: &librqbit::ManagedTorrentShared) -> anyhow::Result<()> {
anyhow::bail!("not implemented")
}
fn on_piece_completed(&self, _file_id: usize, _offset: u64) -> anyhow::Result<()> {
anyhow::bail!("not implemented")
}
}
#[tokio::main]