Fix Route::ranked type signature.

This commit is contained in:
Sergio Benitez 2016-08-22 20:38:39 -07:00
parent bd9d553050
commit b51cb22f87
1 changed files with 12 additions and 1 deletions

View File

@ -17,7 +17,7 @@ pub struct Route {
}
impl Route {
pub fn ranked<S>(rank: isize, m: Method, path: S, handler: Handler, t: ContentType)
pub fn full<S>(rank: isize, m: Method, path: S, handler: Handler, t: ContentType)
-> Route where S: AsRef<str> {
Route {
method: m,
@ -28,6 +28,17 @@ impl Route {
}
}
pub fn ranked<S>(rank: isize, m: Method, path: S, handler: Handler)
-> Route where S: AsRef<str> {
Route {
method: m,
path: URIBuf::from(path.as_ref()),
handler: handler,
rank: rank,
content_type: ContentType::any(),
}
}
pub fn new<S>(m: Method, path: S, handler: Handler)
-> Route where S: AsRef<str> {
Route {