diff --git a/net/webrtchttp/src/utils.rs b/net/webrtchttp/src/utils.rs index b2db15513..0f5ffebcc 100644 --- a/net/webrtchttp/src/utils.rs +++ b/net/webrtchttp/src/utils.rs @@ -226,7 +226,10 @@ pub fn set_ice_servers( // construct url as '://@' let url = format!("{}://{}", link.uri.scheme(), link.uri.path()); - let Ok(mut new_url) = reqwest::Url::parse(url.as_str()) else { continue }; + let mut new_url = match reqwest::Url::parse(url.as_str()) { + Ok(url) => url, + Err(_) => continue, + }; if let Some(user) = link.params.get("username") { new_url.set_username(user.as_str()).unwrap();