mirror of https://github.com/rwf2/Rocket.git
Fix Route::ranked type signature.
This commit is contained in:
parent
bd9d553050
commit
b51cb22f87
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue