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

explain that Router::merge only merges paths and fallback #2316

Merged
merged 2 commits into from
Nov 18, 2023

Conversation

Emilgardis
Copy link
Contributor

Motivation

The current documentation on Router::merge suggests to me in a naive reading that layers applied in a Router that is then merged with another Router gets applied to the "top-level" Routers paths, this is not the case.

Solution

Explain that only paths and fallbacks are merged, hopefully to dispel any wrongful assumptions.

Co-authored-by: Emil Gardström <emil.gardstrom@gmail.com>
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 enabled auto-merge (squash) November 18, 2023 12:27
@davidpdrsn davidpdrsn merged commit f7a0011 into tokio-rs:main Nov 18, 2023
18 checks passed
@Emilgardis Emilgardis deleted the merge-explained branch November 18, 2023 13:12
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