Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: normal match repeated pattern #37

Merged
merged 5 commits into from
Jan 2, 2024

Conversation

TroyKomodo
Copy link
Contributor

fixes: #36

@TroyKomodo
Copy link
Contributor Author

TroyKomodo commented Jan 1, 2024

main (baseline)

path_find/path_tree_findtime:
[18.834 µs 18.871 µs 18.912 µs]

bugfix

path_find/path_tree_findtime:
[19.249 µs 19.276 µs 19.307 µs]

iterator copied

path_find/path_tree_findtime:
[25.750 µs 25.804 µs 25.870 µs]

This commit adds a feature which allows the normal matcher to match
paths like `/:file.gz` or `/:lib.js.gz`

Previously this would have found no routes on paths like
`/node.js.gz`

Now `/:file.gz` matches `/node.js.gz` where "name" => "node.js"
And `/:lib.js.gz` matches `/node.js.gz` where "lib" => "node"

Which to me seems like the correct result in these cases.

fixes: viz-rs#36
TroyKomodo added a commit to ScuffleTV/scuffle that referenced this pull request Jan 1, 2024
@fundon fundon merged commit a767043 into viz-rs:main Jan 2, 2024
6 checks passed
@fundon
Copy link
Member

fundon commented Jan 2, 2024

Landed in v0.7.4.

@TroyKomodo TroyKomodo deleted the troy/fix-dot-find branch January 2, 2024 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in parsing path with dots
2 participants