mirror of
https://github.com/fafhrd91/actix-net
synced 2025-01-31 03:42:08 +01:00
improve malformed path error message (#384)
This commit is contained in:
parent
5379a46a99
commit
48b2e11509
@ -927,7 +927,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);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user