mirror of https://github.com/fafhrd91/actix-web
make comparison on existing else if block
This commit is contained in:
parent
97a7d951cd
commit
156935dc61
|
@ -86,9 +86,7 @@ impl ResourceMap {
|
||||||
if let Some(plen) = pattern.is_prefix_match(path) {
|
if let Some(plen) = pattern.is_prefix_match(path) {
|
||||||
return rmap.has_resource(&path[plen..]);
|
return rmap.has_resource(&path[plen..]);
|
||||||
}
|
}
|
||||||
} else if pattern.is_match(path) {
|
} else if pattern.is_match(path) || pattern.pattern() == "" && path == "/" {
|
||||||
return true;
|
|
||||||
} else if pattern.pattern() == "" && path == "/" {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue