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

simplified code #694

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

Conversation

wandercn
Copy link

@wandercn wandercn commented Apr 9, 2024

remove generic T

remove generic T
@tesaguri
Copy link
Contributor

tesaguri commented Apr 9, 2024

This is a breaking change and I don't think it is going to be accepted, although I'm not the maintainer of the project.

Alternatively, you could add a default type to the T parameter, which is a non-breaking change, but in that case, the default parameter wouldn't be able to &str because that would require a lifetime parameter, and String wouldn't be appropriate as the default type for many use cases either due to a performance reason.

So, what is your motivation behind the change? If you just don't want to write type parameters in your code, you can define a type alias like type Port = http::uri::Port<String>; in your code.

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.

None yet

2 participants