diff --git a/src/api_info.rs b/src/api_info.rs index e6d7437a..8624b64f 100644 --- a/src/api_info.rs +++ b/src/api_info.rs @@ -65,7 +65,7 @@ impl ApiInfo { key_id: impl ToString, secret: impl ToString, ) -> Result { - let api_base_url = Url::parse(api_base_url.as_ref())?; + let api_base_url = Url::parse(api_base_url.as_ref()).unwrap(); let api_stream_url = make_api_stream_url(api_base_url.clone())?; Ok(Self { @@ -106,7 +106,7 @@ impl ApiInfo { .map_err(|_| { Error::Str(format!("{ENV_API_BASE_URL} environment variable is not a valid string").into()) })?; - let api_base_url = Url::parse(&api_base_url)?; + let api_base_url = Url::parse(&api_base_url).unwrap(); let api_stream_url = var_os(ENV_API_STREAM_URL) .map(Result::<_, Error>::Ok) @@ -122,7 +122,7 @@ impl ApiInfo { format!("{ENV_API_STREAM_URL} environment variable is not a valid string").into(), ) })?; - let api_stream_url = Url::parse(&api_stream_url)?; + let api_stream_url = Url::parse(&api_stream_url).unwrap(); let key_id = var_os(ENV_KEY_ID) .ok_or_else(|| Error::Str(format!("{ENV_KEY_ID} environment variable not found").into()))? diff --git a/src/data/v2/stream.rs b/src/data/v2/stream.rs index f54d8550..e058115a 100644 --- a/src/data/v2/stream.rs +++ b/src/data/v2/stream.rs @@ -849,7 +849,7 @@ where url.set_path(&format!("v2/{}", component)); url }, - SourceVariant::Url(url) => Url::parse(&url)?, + SourceVariant::Url(url) => Url::parse(&url).unwrap(), }; let stream = Unfold::new( @@ -1659,7 +1659,7 @@ mod tests { .unwrap_err(); match err { - Error::Url(..) => (), + //Error::Url(..) => (), _ => panic!("Received unexpected error: {err:?}"), }; } diff --git a/src/error.rs b/src/error.rs index b89046fe..4da13c23 100644 --- a/src/error.rs +++ b/src/error.rs @@ -80,13 +80,13 @@ pub enum Error { /// An error directly originating in this crate. #[error("{0}")] Str(Str), - /// An URL parsing error. - #[error("failed to parse the URL")] - Url( - #[from] - #[source] - ParseError, - ), + ///// An URL parsing error. + //#[error("failed to parse the URL")] + //Url( + // #[from] + // #[source] + // ParseError, + //), /// A websocket error. #[error("encountered a websocket related error")] WebSocket(