redirect and error reform

- `Error` has been made an opaque struct.
- `RedirectPolicy` now makes use of `RedirectAttempt` and `RedirectAction`.
This commit is contained in:
Sean McArthur
2017-05-05 09:59:12 -07:00
parent b0ef498f77
commit d514d4e6e8
6 changed files with 284 additions and 103 deletions

View File

@@ -89,7 +89,7 @@ impl Response {
/// Try and deserialize the response body as JSON.
#[inline]
pub fn json<T: Deserialize>(&mut self) -> ::Result<T> {
serde_json::from_reader(self).map_err(::Error::from)
serde_json::from_reader(self).map_err(::error::from)
}
}