-
Notifications
You must be signed in to change notification settings - Fork 38
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
Allow merging two matchit Routers #57
Comments
That seems reasonable, I would accept a PR for this. |
Any implementation hints? ^^ |
matchit is a standard prefix trie internally. I think the simplest way to implement this is to create an internal iterator and call An iterator would involve performing depth/breadth-first search on the tree, collecting the prefix of each node to construct a given route. There's an existing example of reconstructing a specific route here. It may be easier to structure this as a |
Released in 0.8.5. |
axum currently does a bunch of extra bookkeeping of its own in order to be able to merge two of its own
Router
s. I think some of this could be simplified if there was some functionality in matchit to merge twomatchit::Router
s. Would you consider a PR for this?The text was updated successfully, but these errors were encountered: