mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-26 06:57:43 +02:00
compile time validation of path (#2350)
* compile time validation of path * added trybuild err message * Update Cargo.toml * add changelog entry * test more cases of path validation * fmt Co-authored-by: Rob Ede <robjtede@icloud.com>
This commit is contained in:
committed by
GitHub
parent
4bb32fb19b
commit
168b2f227d
@ -967,7 +967,10 @@ impl ResourceDef {
|
||||
_ => false,
|
||||
})
|
||||
.unwrap_or_else(|| {
|
||||
panic!(r#"path "{}" contains malformed dynamic segment"#, pattern)
|
||||
panic!(
|
||||
r#"pattern "{}" contains malformed dynamic segment"#,
|
||||
pattern
|
||||
)
|
||||
});
|
||||
|
||||
let (mut param, mut unprocessed) = pattern.split_at(close_idx + 1);
|
||||
|
Reference in New Issue
Block a user