Skip to content

Commit 67d177b

Browse files
committed
refactor: [#1524] command/query separation
The returned value is not needed anymore. Secondary action (increase metrics) is done in the event listeners.
1 parent 8c31549 commit 67d177b

File tree

11 files changed

+82
-128
lines changed

11 files changed

+82
-128
lines changed

packages/axum-http-tracker-server/src/environment.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ pub struct Environment<S> {
2525

2626
impl<S> Environment<S> {
2727
/// Add a torrent to the tracker
28-
pub async fn add_torrent_peer(&self, info_hash: &InfoHash, peer: &peer::Peer) -> bool {
28+
pub async fn add_torrent_peer(&self, info_hash: &InfoHash, peer: &peer::Peer) {
2929
self.container
3030
.tracker_core_container
3131
.in_memory_torrent_repository
3232
.handle_announcement(info_hash, peer, None)
33-
.await
33+
.await;
3434
}
3535
}
3636

packages/axum-rest-tracker-api-server/src/environment.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ where
3333
S: std::fmt::Debug + std::fmt::Display,
3434
{
3535
/// Add a torrent to the tracker
36-
pub async fn add_torrent_peer(&self, info_hash: &InfoHash, peer: &peer::Peer) -> bool {
36+
pub async fn add_torrent_peer(&self, info_hash: &InfoHash, peer: &peer::Peer) {
3737
self.container
3838
.tracker_core_container
3939
.in_memory_torrent_repository
4040
.handle_announcement(info_hash, peer, None)
41-
.await
41+
.await;
4242
}
4343
}
4444

0 commit comments

Comments
 (0)