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:
@@ -5,7 +5,6 @@
|
||||
use std::io::{self, Read};
|
||||
use std::net::SocketAddr;
|
||||
|
||||
use {HttpResult};
|
||||
use buffer::BufReader;
|
||||
use net::NetworkStream;
|
||||
use version::{HttpVersion};
|
||||
@@ -35,7 +34,7 @@ impl<'a, 'b: 'a> Request<'a, 'b> {
|
||||
/// Create a new Request, reading the StartLine and Headers so they are
|
||||
/// immediately useful.
|
||||
pub fn new(mut stream: &'a mut BufReader<&'b mut NetworkStream>, addr: SocketAddr)
|
||||
-> HttpResult<Request<'a, 'b>> {
|
||||
-> ::Result<Request<'a, 'b>> {
|
||||
|
||||
let Incoming { version, subject: (method, uri), headers } = try!(http::parse_request(stream));
|
||||
debug!("Request Line: {:?} {:?} {:?}", method, uri, version);
|
||||
|
||||
Reference in New Issue
Block a user