diff --git a/lib/src/router/route.rs b/lib/src/router/route.rs index d45d1c76..7c2016bb 100644 --- a/lib/src/router/route.rs +++ b/lib/src/router/route.rs @@ -17,7 +17,7 @@ pub struct Route { } impl Route { - pub fn ranked(rank: isize, m: Method, path: S, handler: Handler, t: ContentType) + pub fn full(rank: isize, m: Method, path: S, handler: Handler, t: ContentType) -> Route where S: AsRef { Route { method: m, @@ -28,6 +28,17 @@ impl Route { } } + pub fn ranked(rank: isize, m: Method, path: S, handler: Handler) + -> Route where S: AsRef { + Route { + method: m, + path: URIBuf::from(path.as_ref()), + handler: handler, + rank: rank, + content_type: ContentType::any(), + } + } + pub fn new(m: Method, path: S, handler: Handler) -> Route where S: AsRef { Route {