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: removals #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: removals #23

wants to merge 1 commit into from

Conversation

onbjerg
Copy link
Contributor

@onbjerg onbjerg commented Feb 25, 2025

Adds Router::remove_route to remove methods from the router

Closes #16

/// Remove a method from the router.
///
/// If the route does not exist, this method is a no-op.
pub(crate) fn remove_route(mut self, method: Cow<'static, str>) -> Self {
Copy link
Member

Choose a reason for hiding this comment

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

I haven't thought deeply about how this should interact with aliasing. should removing a method also remove all aliases of it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I imagine as a user you would expect that most of the time, but I guess there is a case where you want to remove just the alias or just the method you aliased

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.

feat: remove method by name
2 participants