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

Add get_mut support #3

Merged
merged 3 commits into from
Jun 30, 2023
Merged

Conversation

Technohacker
Copy link
Contributor

@Technohacker Technohacker commented Jun 29, 2023

Mutability support is opt-in by using the #[typemap_mut] attribute

Fixes #2

Mutability support is opt-in by using the #[typemap_mut] attribute
@Technohacker
Copy link
Contributor Author

Technohacker commented Jun 29, 2023

I was initially planning on just adding get_mut to Get, but I realized that would be a breaking API change since it could potentially introduce mutability where it isn't wanted 😅

Added benefit with it being opt-in is users can choose to keep their structs immutable. If the need arises, it should be possible to add type-selective mutability by specifying the attribute on the field instead of the struct, but that isn't implemented in this PR :)

@stephanemagnenat
Copy link
Member

Thanks a lot! Lints fail due to formatting. Please run cargo fmt and then I can merge.

Also, I guess you'll need a new release. I assume we could release 0.1.1, but maybe it is better to release 0.2, do you have an opinion on that point?

@Technohacker
Copy link
Contributor Author

Will do!

To my understanding this would be new functionality without backwards-incompatible changes, so 0.2.0 sounds good to me :)

@stephanemagnenat stephanemagnenat merged commit a3eeb78 into enlightware:main Jun 30, 2023
3 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.

Support for get_mut
2 participants