Skip to content

Commit 040bc21

Browse files
committed
CI: [#807] using write to append string
1 parent 6540ada commit 040bc21

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/torrent.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//! Torrent service.
2+
use std::fmt::Write as _;
23
use std::sync::Arc;
34

45
use bittorrent_primitives::info_hash::InfoHash;
@@ -550,7 +551,7 @@ impl Index {
550551

551552
// Add trackers from torrent file to magnet link
552553
for tracker in &torrent_response.trackers {
553-
magnet.push_str(&format!("&tr={}", urlencoding::encode(tracker)));
554+
let _ = write!(&mut magnet, "&tr={}", urlencoding::encode(tracker));
554555
}
555556

556557
torrent_response.magnet_link = magnet;

0 commit comments

Comments
 (0)