Skip to content

Commit d583eba

Browse files
committed
(fix) Fix an overflow in evaluating trait bounds.
See: rust-lang/rust#22655 Fixes iron#71
1 parent 4453e33 commit d583eba

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

examples/simple.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fn main() {
1313
router.get("/", handler);
1414
router.get("/:query", handler);
1515

16-
Iron::new(router).listen("localhost:3000").unwrap();
16+
Iron::new(handler).http("localhost:3000").unwrap();
1717

1818
fn handler(req: &mut Request) -> IronResult<Response> {
1919
let ref query = req.extensions.get::<Router>()

src/router.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ pub struct Router {
1818
routers: HashMap<method::Method, Recognizer<Box<Handler>>>
1919
}
2020

21+
unsafe impl Send for Router {}
22+
unsafe impl Sync for Router {}
23+
2124
impl Router {
2225
/// Construct a new, empty `Router`.
2326
///

0 commit comments

Comments
 (0)