Skip to content

Commit

Permalink
into_client_request_v1
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive committed Sep 25, 2024
1 parent 9d40330 commit c6b6481
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/weirduri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ fn combine_addr_and_port(addr: &url::Host<&str>, port: Option<u16>) -> String {

impl IntoClientRequest for WeirdUri {
fn into_client_request(self) -> Result<Request> {
self.into_client_request_v1()
}
}

impl WeirdUri {
fn into_client_request_v1(self) -> Result<Request> {
let uri = url::Url::parse(&self.uri).map_err(|_| Error::Url(UrlError::NoPathOrQuery))?;

let host = uri.host().ok_or(Error::from(UrlError::EmptyHostName))?;
Expand Down

0 comments on commit c6b6481

Please sign in to comment.