parent
8e77f20a5a
commit
07bd9dec83
12 changed files with 11 additions and 112 deletions
|
|
@ -8,7 +8,6 @@ use anyhow::Context;
|
|||
|
||||
use parking_lot::Mutex;
|
||||
|
||||
use sha1w::Sha1;
|
||||
use size_format::SizeFormatterBinary as SF;
|
||||
use tracing::{debug, info, warn};
|
||||
|
||||
|
|
@ -81,7 +80,7 @@ impl TorrentStateInitializing {
|
|||
|
||||
info!("Doing initial checksum validation, this might take a while...");
|
||||
let initial_check_results = self.meta.spawner.spawn_block_in_place(|| {
|
||||
FileOps::<Sha1>::new(&self.meta.info, &files, &self.meta.lengths)
|
||||
FileOps::new(&self.meta.info, &files, &self.meta.lengths)
|
||||
.initial_check(self.only_files.as_deref(), &self.checked_bytes)
|
||||
})?;
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,6 @@ use parking_lot::{Mutex, RwLock, RwLockReadGuard, RwLockWriteGuard};
|
|||
use peer_binary_protocol::{
|
||||
extended::handshake::ExtendedHandshake, Handshake, Message, MessageOwned, Piece, Request,
|
||||
};
|
||||
use sha1w::Sha1;
|
||||
use tokio::{
|
||||
sync::{
|
||||
mpsc::{unbounded_channel, UnboundedReceiver, UnboundedSender},
|
||||
|
|
@ -492,7 +491,7 @@ impl TorrentStateLive {
|
|||
pub fn peer_id(&self) -> Id20 {
|
||||
self.meta.peer_id
|
||||
}
|
||||
pub(crate) fn file_ops(&self) -> FileOps<'_, Sha1> {
|
||||
pub(crate) fn file_ops(&self) -> FileOps<'_> {
|
||||
FileOps::new(&self.meta.info, &self.files, &self.lengths)
|
||||
}
|
||||
pub fn initially_needed(&self) -> u64 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue