Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
steveklabnik committed Oct 19, 2018
1 parent 7c40c47 commit 8211c87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ extern crate num_cpus;
extern crate scoped_threadpool;
extern crate time;

pub use http::Request;
pub use http::method::Method;
pub use http::response::Builder as ResponseBuilder;
pub use http::response::{Builder, Parts, Response};
pub use http::status::{InvalidStatusCode, StatusCode};
pub use http::Request;

use scoped_threadpool::Pool;

Expand Down
9 changes: 4 additions & 5 deletions src/parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ pub fn try_parse_request(buffer: Vec<u8>) -> Result<ParseResult, httparse::Error
let method = RequestMethodIndices(method.0, method.1);

(r, method, proto, n)
})
.map(|(r, method, proto, n)| {
let headers = r.headers
}).map(|(r, method, proto, n)| {
let headers = r
.headers
.iter()
.map(
|&httparse::Header {
Expand All @@ -109,8 +109,7 @@ pub fn try_parse_request(buffer: Vec<u8>) -> Result<ParseResult, httparse::Error
value: slice_indices(&*buffer, value),
}
},
)
.collect::<Vec<_>>();
).collect::<Vec<_>>();
(method, proto, headers, n)
})
};
Expand Down

0 comments on commit 8211c87

Please sign in to comment.