Merge branch 'master' into fix-dyn-prefix-match

This commit is contained in:
Rob Ede 2021-08-06 18:06:42 +01:00 committed by GitHub
commit 4f88775ff1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -955,7 +955,9 @@ impl ResourceDef {
} }
_ => false, _ => false,
}) })
.expect("malformed dynamic segment"); .unwrap_or_else(|| {
panic!(r#"path "{}" contains malformed dynamic segment"#, pattern)
});
let (mut param, mut unprocessed) = pattern.split_at(close_idx + 1); let (mut param, mut unprocessed) = pattern.split_at(close_idx + 1);