From b51cb22f8734cbccacd11f3029de38c4248ae20b Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Mon, 22 Aug 2016 20:38:39 -0700 Subject: [PATCH] Fix Route::ranked type signature. --- lib/src/router/route.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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 {