Skip to content

Commit

Permalink
(fix) Fix an overflow in evaluating trait bounds.
Browse files Browse the repository at this point in the history
  • Loading branch information
reem committed Feb 25, 2015
1 parent 4453e33 commit d583eba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn main() {
router.get("/", handler);
router.get("/:query", handler);

Iron::new(router).listen("localhost:3000").unwrap();
Iron::new(handler).http("localhost:3000").unwrap();

fn handler(req: &mut Request) -> IronResult<Response> {
let ref query = req.extensions.get::<Router>()
Expand Down
3 changes: 3 additions & 0 deletions src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ pub struct Router {
routers: HashMap<method::Method, Recognizer<Box<Handler>>>
}

unsafe impl Send for Router {}
unsafe impl Sync for Router {}

impl Router {
/// Construct a new, empty `Router`.
///
Expand Down

4 comments on commit d583eba

@johnwalker
Copy link

Choose a reason for hiding this comment

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

Is the change on line 16 in examples/simple.rs intentional?

@reem
Copy link
Member Author

@reem reem commented on d583eba Mar 18, 2015

Choose a reason for hiding this comment

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

Oh ugh, the change to http is intended, the change to handler is not :/

@reem
Copy link
Member Author

@reem reem commented on d583eba Mar 18, 2015

Choose a reason for hiding this comment

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

@johnwalker Fixed in master.

@johnwalker
Copy link

Choose a reason for hiding this comment

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

Cool, thanks!

Please sign in to comment.