diff --git a/Cargo.toml b/Cargo.toml index 365ace2..1f10aa5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,4 @@ [package] - name = "router" authors = ["Jonathan Reem "] license = "MIT" @@ -10,6 +9,6 @@ documentation = "http://ironframework.io/doc/router/index.html" keywords = ["iron", "web", "http", "routing", "router"] [dependencies] -route-recognizer = "0.1" +route-recognizer = "0.1.13" iron = { git = "https://github.com/iron/iron", branch = "master" } url = "1.1" diff --git a/src/router.rs b/src/router.rs index 7ba94f9..3fb5736 100644 --- a/src/router.rs +++ b/src/router.rs @@ -14,9 +14,9 @@ use recognizer::{Match, Params}; pub struct RouterInner { // The routers, specialized by method. - pub routers: HashMap>>, + pub routers: HashMap>>, // Routes that accept any method. - pub wildcard: Recognizer>, + pub wildcard: Recognizer>, // Used in URL generation. pub route_ids: HashMap } @@ -136,7 +136,7 @@ impl Router { } fn recognize(&self, method: &method::Method, path: &str) - -> Option>> { + -> Option>> { self.inner.routers.get(method).and_then(|router| router.recognize(path).ok()) .or(self.inner.wildcard.recognize(path).ok()) }