mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-28 01:52:57 +01:00
fix stable compiler compatibility
This commit is contained in:
parent
4a29f12876
commit
9c1bda3eca
@ -319,10 +319,10 @@ where
|
|||||||
/// }
|
/// }
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// In the above example three routes get registered:
|
/// In the above example, three routes get added:
|
||||||
/// * /app/path1 - reponds to all http method
|
/// * /app/path1
|
||||||
/// * /app/path2 - `GET` requests
|
/// * /app/path2
|
||||||
/// * /app/path3 - `HEAD` requests
|
/// * /app/path3
|
||||||
///
|
///
|
||||||
pub fn scope<F>(mut self, path: &str, f: F) -> App<S>
|
pub fn scope<F>(mut self, path: &str, f: F) -> App<S>
|
||||||
where
|
where
|
||||||
|
@ -184,7 +184,7 @@ impl<S: 'static> RouteHandler<S> for Scope<S> {
|
|||||||
let path = unsafe { &*(&req.match_info()["tail"] as *const _) };
|
let path = unsafe { &*(&req.match_info()["tail"] as *const _) };
|
||||||
let path = if path == "" { "/" } else { path };
|
let path = if path == "" { "/" } else { path };
|
||||||
|
|
||||||
for (pattern, resource) in self.resources.iter() {
|
for &(ref pattern, ref resource) in self.resources.iter() {
|
||||||
if pattern.match_with_params(path, req.match_info_mut()) {
|
if pattern.match_with_params(path, req.match_info_mut()) {
|
||||||
let default = unsafe { &mut *self.default.as_ref().get() };
|
let default = unsafe { &mut *self.default.as_ref().get() };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user