feat(client): accept &String for a Url in RequestBuilder

adds an IntoUrl implementation for &String
This commit is contained in:
Sean McArthur
2015-04-16 10:10:42 -07:00
parent 0fb92ee735
commit 8bc179fb51

View File

@@ -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 {