From f695e3f172341f3efd7cc01b012308a897304b62 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 18 Sep 2024 21:37:16 +0200 Subject: [PATCH] refactor: remove unnecessary slash in tracker url --- tests/e2e/web/api/v1/contexts/torrent/asserts.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/web/api/v1/contexts/torrent/asserts.rs b/tests/e2e/web/api/v1/contexts/torrent/asserts.rs index e268c9d6..b26b9d6f 100644 --- a/tests/e2e/web/api/v1/contexts/torrent/asserts.rs +++ b/tests/e2e/web/api/v1/contexts/torrent/asserts.rs @@ -58,7 +58,7 @@ pub async fn get_user_tracker_key(logged_in_user: &LoggedInUserData, env: &TestE pub fn build_announce_url(tracker_url: &str, tracker_key: &Option) -> String { if let Some(key) = &tracker_key { - format!("{tracker_url}/{}", key.key) + format!("{tracker_url}{}", key.key) } else { tracker_url.to_string() } @@ -66,7 +66,7 @@ pub fn build_announce_url(tracker_url: &str, tracker_key: &Option) - fn build_announce_list(tracker_url: &str, tracker_key: &Option) -> Vec> { if let Some(key) = &tracker_key { - vec![vec![format!("{tracker_url}/{}", key.key)], vec![format!("{tracker_url}")]] + vec![vec![format!("{tracker_url}{}", key.key)], vec![format!("{tracker_url}")]] } else { vec![vec![format!("{tracker_url}")]] }