Remove some trait bounds

This commit is contained in:
Igor Katson 2021-07-04 18:01:58 +01:00
parent 44c760bcc2
commit 4f07b0f785
3 changed files with 15 additions and 19 deletions

View file

@ -2,7 +2,6 @@ use std::{
collections::HashSet,
fs::{File, OpenOptions},
net::SocketAddr,
ops::Deref,
path::{Path, PathBuf},
sync::Arc,
time::{Duration, Instant},
@ -139,7 +138,7 @@ struct TorrentManager {
force_tracker_interval: Option<Duration>,
}
fn make_lengths<ByteBuf: Clone + Deref<Target = [u8]>>(
fn make_lengths<ByteBuf: AsRef<[u8]>>(
torrent: &TorrentMetaV1Info<ByteBuf>,
) -> anyhow::Result<Lengths> {
let total_length = torrent.iter_file_lengths().sum();