Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ axum = { version = "0", features = ["macros"] }
axum-client-ip = "0"
axum-extra = { version = "0", features = ["query"] }
axum-server = { version = "0", features = ["tls-rustls"] }
bittorrent-primitives = "0.1.0"
camino = { version = "1", features = ["serde", "serde1"] }
chrono = { version = "0", default-features = false, features = ["clock"] }
clap = { version = "4", features = ["derive", "env"] }
Expand Down
2 changes: 1 addition & 1 deletion contrib/bencode/src/access/bencode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub trait BRefAccessExt<'a>: BRefAccess {
fn bytes_ext(&self) -> Option<&'a [u8]>;
}

impl<'a, T> BRefAccess for &'a T
impl<T> BRefAccess for &T
where
T: BRefAccess,
{
Expand Down
6 changes: 3 additions & 3 deletions packages/located-error/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ where
location: Box<Location<'a>>,
}

impl<'a, E> std::fmt::Display for LocatedError<'a, E>
impl<E> std::fmt::Display for LocatedError<'_, E>
where
E: Error + ?Sized + Send + Sync,
{
Expand All @@ -59,7 +59,7 @@ where
}
}

impl<'a, E> Error for LocatedError<'a, E>
impl<E> Error for LocatedError<'_, E>
where
E: Error + ?Sized + Send + Sync + 'static,
{
Expand All @@ -68,7 +68,7 @@ where
}
}

impl<'a, E> Clone for LocatedError<'a, E>
impl<E> Clone for LocatedError<'_, E>
where
E: Error + ?Sized + Send + Sync,
{
Expand Down
1 change: 1 addition & 0 deletions packages/primitives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ version.workspace = true
[dependencies]
aquatic_udp_protocol = "0"
binascii = "0"
bittorrent-primitives = "0.1.0"
derive_more = { version = "1", features = ["constructor"] }
serde = { version = "1", features = ["derive"] }
tdyne-peer-id = "1"
Expand Down
220 changes: 0 additions & 220 deletions packages/primitives/src/info_hash.rs

This file was deleted.

11 changes: 5 additions & 6 deletions packages/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@
//! which is a `BitTorrent` tracker server. These structures are used not only
//! by the tracker server crate, but also by other crates in the Torrust
//! ecosystem.
use std::collections::BTreeMap;
use std::time::Duration;

use info_hash::InfoHash;

pub mod info_hash;
pub mod pagination;
pub mod peer;
pub mod swarm_metadata;
pub mod torrent_metrics;

use std::collections::BTreeMap;
use std::time::Duration;

use bittorrent_primitives::info_hash::InfoHash;

/// Duration since the Unix Epoch.
pub type DurationSinceUnixEpoch = Duration;

Expand Down
1 change: 1 addition & 0 deletions packages/torrent-repository/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ version.workspace = true

[dependencies]
aquatic_udp_protocol = "0"
bittorrent-primitives = "0.1.0"
crossbeam-skiplist = "0"
dashmap = "6"
futures = "0"
Expand Down
Loading