Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Using hyper-mio branch in webapps. #957

Merged
merged 8 commits into from
Apr 17, 2016
Merged

Using hyper-mio branch in webapps. #957

merged 8 commits into from
Apr 17, 2016

Conversation

tomusdrw
Copy link
Collaborator

No description provided.

@tomusdrw tomusdrw added the A0-pleasereview 🤓 Pull request needs code review. label Apr 14, 2016
fn on_request(&mut self, req: server::Request) -> Next {
if let RequestUri::AbsolutePath(ref path) = *req.uri() {
// Support index file
if path == &self.prefix || path == &self.prefix2 {
Copy link
Contributor

@gavofyork gavofyork Apr 15, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be written more concisely as:

self.path = Some(match path == &self.prefix || path == &self.prefix2 {
    true => "index.html",
    false => path[self.prefix2.len()..],
}.to_owned());

though perhaps it's more readable if Some(....to_owned()) is duplicated:

self.path = match path == &self.prefix || path == &self.prefix2 {
    true => Some("index.html".to_owned()),
    false => Some(path[self.prefix2.len()..].to_owned()),
};

@gavofyork gavofyork added A6-mustntgrumble 💦 Pull request has areas for improvement. The author need not address them before merging. and removed A0-pleasereview 🤓 Pull request needs code review. labels Apr 15, 2016
@arkpar
Copy link
Collaborator

arkpar commented Apr 15, 2016

needs rebase

Tomasz Drwięga added 2 commits April 15, 2016 17:14
@tomusdrw tomusdrw added A0-pleasereview 🤓 Pull request needs code review. and removed A6-mustntgrumble 💦 Pull request has areas for improvement. The author need not address them before merging. labels Apr 16, 2016
@arkpar arkpar added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Apr 17, 2016
@arkpar arkpar merged commit 5547b44 into master Apr 17, 2016
@tomusdrw tomusdrw deleted the webapps-mio branch April 21, 2016 14:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants