refactor(error): remove redundant parts of error names
The old names followed the old style of including the module name and "Error" in each variant. The new style is to refer to an error from its owning module, and variants are now scoped to their enum, so there's no need to include the enum name in the variant name. BREAKING CHANGE: The terms `Http` and `Error` have been removed from the Error type and its variants. `HttpError` should now be accessed as `hyper::Error`, and variants like `HttpIoError` should be accessed as `Error::Io`.
This commit is contained in:
@@ -17,7 +17,6 @@ use typeable::Typeable;
|
||||
use unicase::UniCase;
|
||||
|
||||
use self::internals::Item;
|
||||
use error::HttpResult;
|
||||
|
||||
pub use self::shared::*;
|
||||
pub use self::common::*;
|
||||
@@ -113,7 +112,7 @@ impl Headers {
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub fn from_raw<'a>(raw: &[httparse::Header<'a>]) -> HttpResult<Headers> {
|
||||
pub fn from_raw<'a>(raw: &[httparse::Header<'a>]) -> ::Result<Headers> {
|
||||
let mut headers = Headers::new();
|
||||
for header in raw {
|
||||
trace!("raw header: {:?}={:?}", header.name, &header.value[..]);
|
||||
|
||||
Reference in New Issue
Block a user