Skip to content

Commit d49aebd

Browse files
committed
refactor: [torrust#1270] inline udp tracker scrape invoke fn
1 parent af28429 commit d49aebd

File tree

1 file changed

+1
-13
lines changed
  • src/packages/udp_tracker_core/services

1 file changed

+1
-13
lines changed

src/packages/udp_tracker_core/services/scrape.rs

+1-13
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,7 @@ pub async fn handle_scrape(
3535
info_hashes.push((*info_hash).into());
3636
}
3737

38-
invoke(scrape_handler, opt_udp_stats_event_sender, &info_hashes, remote_addr).await
39-
}
40-
41-
/// # Errors
42-
///
43-
/// It will return an error if the tracker core scrape handler returns an error.
44-
pub async fn invoke(
45-
scrape_handler: &Arc<ScrapeHandler>,
46-
opt_udp_stats_event_sender: &Arc<Option<Box<dyn udp_tracker_core::statistics::event::sender::Sender>>>,
47-
info_hashes: &Vec<InfoHash>,
48-
remote_addr: SocketAddr,
49-
) -> Result<ScrapeData, ScrapeError> {
50-
let scrape_data = scrape_handler.scrape(info_hashes).await?;
38+
let scrape_data = scrape_handler.scrape(&info_hashes).await?;
5139

5240
if let Some(udp_stats_event_sender) = opt_udp_stats_event_sender.as_deref() {
5341
match remote_addr {

0 commit comments

Comments
 (0)