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

Unite as_ref and as_mut features #295

Merged
merged 4 commits into from
Aug 21, 2023
Merged

Conversation

MegaBluejay
Copy link
Contributor

@MegaBluejay MegaBluejay commented Aug 18, 2023

First suggested here

Synopsis

AsRef and AsMut derives are effectively the same regarding implementation, so using separate features for them doesn't make sense.

Solution

Use the as_ref feature for both derives

Checklist

  • Documentation is updated (if required)
  • Tests are added/updated (if required)
  • CHANGELOG entry is added (if required)

@MegaBluejay
Copy link
Contributor Author

We could keep the as_mut feature around as a synonym, making this a non-breaking change.
As far as I understand removing it from the public interface is part of the goal here, so I didn't.

@MegaBluejay MegaBluejay marked this pull request as ready for review August 18, 2023 16:31
@tyranron
Copy link
Collaborator

@MegaBluejay we're going to 1.0.0, so breaking changes are okay now, not later. I think that keeping as_mut as synonym will make even more confusion to library users. It's okay to have just as_ref, just deref, and so on...

tyranron
tyranron previously approved these changes Aug 21, 2023
@tyranron tyranron merged commit bfd68af into JelteF:master Aug 21, 2023
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