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

Fist step to transition away from const generic parameter polution #31

Merged
merged 2 commits into from
Mar 12, 2024

Conversation

nyospe
Copy link
Contributor

@nyospe nyospe commented Mar 11, 2024

I think this is going to look much nicer...

@nyospe nyospe requested a review from jbearer March 11, 2024 22:53
src/version.rs Outdated
@@ -34,12 +34,17 @@ impl Version {
}
}

pub trait StaticVersionType: private::Sealed {
Copy link
Member

Choose a reason for hiding this comment

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

What's the point of having StaticVersionType and VersionType?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

StaticVersionType allows us to proxy the associated type mechanic with a locked generic type. It's impossible to implement a StaticVersionType that isn't StaticVersion<MAJOR, MINOR>, and that's pre-implemented.

VersionType is a leftover from an earlier experiment that didn't work. I missed that, and I'll remove it.

@nyospe nyospe merged commit a0da980 into main Mar 12, 2024
5 checks passed
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