We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d49aebd commit d0e6936Copy full SHA for d0e6936
src/packages/udp_tracker_core/services/scrape.rs
@@ -30,10 +30,7 @@ pub async fn handle_scrape(
30
opt_udp_stats_event_sender: &Arc<Option<Box<dyn udp_tracker_core::statistics::event::sender::Sender>>>,
31
) -> Result<ScrapeData, ScrapeError> {
32
// Convert from aquatic infohashes
33
- let mut info_hashes: Vec<InfoHash> = vec![];
34
- for info_hash in &request.info_hashes {
35
- info_hashes.push((*info_hash).into());
36
- }
+ let info_hashes: Vec<InfoHash> = request.info_hashes.iter().map(|&x| x.into()).collect();
37
38
let scrape_data = scrape_handler.scrape(&info_hashes).await?;
39
0 commit comments