Added wildcard feature#586
Conversation
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
ElijahAhianyo
left a comment
There was a problem hiding this comment.
@dharshan-0 Thanks a lot for your contribution. This is a great start! Let's address the comments, and it's good to merge.
|
@ElijahAhianyo Thanks for your comments, I will look into it. |
…nto wildcard-feature pulled remote changes
Co-authored-by: EBADF <elijahahianyo@gmail.com>
ElijahAhianyo
left a comment
There was a problem hiding this comment.
@dharshan-0 Thanks for your contribution once again!
seqre
left a comment
There was a problem hiding this comment.
Overall, it's a great job, thank you for your contribution!
I see one possible clash with overlapping routes, eg. /foo/{*path} and /foo/bar. To be honest, I'm not sure which route the framework would use atm. I think that it should first use the qualified path if it exists, and if it doesn't, then match the wildcard one.
I'd like for you to add a test(s) checking that functionality (also with different ordering of route definition in Router::with_urls) and if it does not work like that, to adapt the code. Also, mention that in the documentation, please.
Once that's done, I'll be happy to approve!
Related issue or discussion
Description
It closes #545 by adding wildcard routing feature.
It uses this
{*param_name}to define wildcard.Type of change
Checklist
just test-all)just clippy)cargo fmt)