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

Don't create a RouteId if routes can be merged #2174

Merged
merged 1 commit into from
Aug 14, 2023
Merged

Conversation

danpls
Copy link
Contributor

@danpls danpls commented Aug 14, 2023

While looking through the code, I noticed that the function PathRouter::route unnecessarily creates a RouteId even if the correct route already exists, thus remaining unused in the code path. To prevent this, move the creation of a new RouteId further down to right before it is used.

Copy link
Member

@davidpdrsn davidpdrsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@davidpdrsn davidpdrsn merged commit 483ba7d into tokio-rs:main Aug 14, 2023
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.

2 participants