This commit is contained in:
Rob Ede 2021-07-20 07:31:35 +01:00
parent 9b9307cc30
commit c48780021b
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
1 changed files with 2 additions and 4 deletions

View File

@ -573,10 +573,9 @@ impl ResourceDef {
PatternType::Prefix(ref prefix) => is_strict_prefix(prefix, path),
// dynamic prefix
PatternType::Dynamic(ref re, _) if !re.as_str().ends_with("$") => {
PatternType::Dynamic(ref re, _) if !re.as_str().ends_with('$') => {
match re.find(path) {
// prefix matches exactly
// TODO: im p sure tail segments will hit this now too
Some(m) if m.end() == path.len() => true,
// prefix matches part
@ -639,10 +638,9 @@ impl ResourceDef {
PatternType::Prefix(_) => None,
// dynamic prefix
PatternType::Dynamic(ref re, _) if !re.as_str().ends_with("$") => {
PatternType::Dynamic(ref re, _) if !re.as_str().ends_with('$') => {
match re.find(path) {
// prefix matches exactly
// TODO: im p sure tail segments will hit this now too
Some(m) if m.end() == path.len() => Some(m.end()),
// prefix matches part