Skip to content

Commit

Permalink
refactor: remove unnecessary slash in tracker url
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-nt committed Sep 18, 2024
1 parent 4288f65 commit f695e3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/e2e/web/api/v1/contexts/torrent/asserts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ pub async fn get_user_tracker_key(logged_in_user: &LoggedInUserData, env: &TestE

pub fn build_announce_url(tracker_url: &str, tracker_key: &Option<TrackerKey>) -> String {
if let Some(key) = &tracker_key {
format!("{tracker_url}/{}", key.key)
format!("{tracker_url}{}", key.key)
} else {
tracker_url.to_string()
}
}

fn build_announce_list(tracker_url: &str, tracker_key: &Option<TrackerKey>) -> Vec<Vec<String>> {
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}")]]
}
Expand Down

0 comments on commit f695e3f

Please sign in to comment.