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

Relax trait bounds for Default implementation #19

Merged
merged 1 commit into from
Apr 2, 2022

Conversation

jonasbb
Copy link
Contributor

@jonasbb jonasbb commented Apr 1, 2022

The Default derive adds a T: Default and a N: Default bound on the implementation. The T: Default bound is however not necessary and can be removed by manually implementing Default.

It might also be worth to consider changing the bounds to N: Zero, to bring it in line with most other trait implementations. This would, however, change Default in non-backwards compatible ways, which is why I didn't attempt that.

@coriolinus
Copy link
Owner

Thanks for spotting / improving this! Agree that we shouldn't add N: Zero in this case. Will push a point release shortly.

@coriolinus coriolinus merged commit 84fed5e into coriolinus:master Apr 2, 2022
@clint-white clint-white mentioned this pull request May 1, 2022
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