Skip to content

Commit

Permalink
feat(client): accept &String for a Url in RequestBuilder
Browse files Browse the repository at this point in the history
adds an IntoUrl implementation for &String
  • Loading branch information
seanmonstar committed Apr 16, 2015
1 parent 0fb92ee commit 8bc179f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,12 @@ impl<'a> IntoUrl for &'a str {
}
}

impl<'a> IntoUrl for &'a String {
fn into_url(self) -> Result<Url, UrlError> {
Url::parse(self)
}
}

/// Behavior regarding how to handle redirects within a Client.
#[derive(Copy)]
pub enum RedirectPolicy {
Expand Down

0 comments on commit 8bc179f

Please sign in to comment.