Ogeon / rustful

[OUTDATED] A light HTTP framework for Rust
https://docs.rs/rustful
Apache License 2.0
862 stars 52 forks source link

Implement Handler for Arc #74

Closed kvikas closed 8 years ago

kvikas commented 8 years ago

Implement Handler for Arc and Box

  1. Handler trait impl for Arc<T> calls handle_request() on T.
  2. Handler trait can not be implemented generically for Box without conflicting with trait impl for Fn(). So implemented for Box<Handler>. Clients need to cast their Box<T> as Box<Handler> to use this.

Fixes #70

Ogeon commented 8 years ago

Can you please rebase this to combine the two first commits? The easiest way is probably to mark the second one as a fixup.

Ogeon commented 8 years ago

Looks great! I'll just wait for the tests to pass before I merge it. Oh, and the description should be edited to say something like "Closes #70".

Ogeon commented 8 years ago

Cool, thank you! :smile:

@homu r+

homu commented 8 years ago

:pushpin: Commit 6315a2e has been approved by Ogeon

homu commented 8 years ago

:hourglass: Testing commit 6315a2e with merge 1901430...

Ogeon commented 8 years ago

Oh, I didn't see that you forgot to surround the type names in the description with `, so I fixed it. We'll see if Homu aborts the merge or not. They'll probably be displayed correctly in the log, anyway, so it's no problem.

homu commented 8 years ago

:sunny: Test successful - status