We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4453e33 commit d583ebaCopy full SHA for d583eba
examples/simple.rs
@@ -13,7 +13,7 @@ fn main() {
13
router.get("/", handler);
14
router.get("/:query", handler);
15
16
- Iron::new(router).listen("localhost:3000").unwrap();
+ Iron::new(handler).http("localhost:3000").unwrap();
17
18
fn handler(req: &mut Request) -> IronResult<Response> {
19
let ref query = req.extensions.get::<Router>()
src/router.rs
@@ -18,6 +18,9 @@ pub struct Router {
routers: HashMap<method::Method, Recognizer<Box<Handler>>>
}
20
21
+unsafe impl Send for Router {}
22
+unsafe impl Sync for Router {}
23
+
24
impl Router {
25
/// Construct a new, empty `Router`.
26
///
0 commit comments