DuskSystems / wayfind

A speedy, flexible router for Rust.
Apache License 2.0
7 stars 0 forks source link

Add additional built-in constraints #96

Closed CathalMullan closed 1 month ago

CathalMullan commented 1 month ago

Considered adding support for Base64, Hex, UUID, Alpha, etc. but decided not to.

Don't want to introduce more dependencies. Any half-assed implementation would probably only cause more issues.

Maybe long term, we can have seperate features for other crates.

codspeed-hq[bot] commented 1 month ago

CodSpeed Performance Report

Merging #96 will degrade performances by 16.96%

Comparing 93-support-more-built-in-constraints (1ba7645) with main (530af10)

Summary

⚡ 3 improvements ❌ 3 (👁 3) regressions ✅ 16 untouched benchmarks

Benchmarks breakdown

Benchmark main 93-support-more-built-in-constraints Change
matchit benchmarks/gonzales 5 µs 4.7 µs +6.23%
👁 matchit benchmarks/matchit 5.2 µs 5.4 µs -2.58%
matchit benchmarks/path-tree 8 µs 7.8 µs +2.15%
matchit benchmarks/regex 19.6 µs 19 µs +3.19%
👁 matchit benchmarks/wayfind 7.7 µs 9.3 µs -16.96%
👁 path-tree benchmarks/wayfind 42.4 µs 45.8 µs -7.48%
codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 72.22222% with 5 lines in your changes missing coverage. Please review.

Files Patch % Lines
src/constraints.rs 0.00% 3 Missing :warning:
src/router.rs 86.66% 2 Missing :warning:
Files Coverage Δ
src/router.rs 89.28% <86.66%> (+0.97%) :arrow_up:
src/constraints.rs 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes