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

remove iter_unsafe/iter_many_unsafe/iter_combinations_unsafe from Query #14286

Closed

Conversation

Victoronz
Copy link
Contributor

@Victoronz Victoronz commented Jul 11, 2024

Objective

The unsafe versions of iter, iter_many and iter_combinations on Query have identical signatures and implementations to their safe mutable versions.

Solution

Remove them.

Testing

They don't appear in tests.

Changelog

Removed the iter_unsafe, iter_many_unsafe and iter_combinations_unsafe methods on Query.

Migration Guide

Uses of iter_unsafe, iter_many_unsafe and iter_combinations_unsafe methods on Query can be safely replaced with their mutable equivalents.

@Victoronz Victoronz added A-ECS Entities, components, systems, and events C-Usability A simple quality-of-life change that makes Bevy easier to use D-Straightforward Simple bug fixes and API improvements, docs, test and examples D-Unsafe Touches with unsafe code in some way S-Needs-Review Needs reviewer attention (from anyone!) to move forward S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 11, 2024
@Victoronz Victoronz marked this pull request as draft July 12, 2024 05:35
@mnmaita
Copy link
Member

mnmaita commented Aug 12, 2024

@Victoronz what does this PR need to be undrafted? Also, unsure if these should be handled as a deprecation and then a removal on a following release, but I'll leave this to maintainers. Thanks!

@Victoronz
Copy link
Contributor Author

I misread their signature and thought I could just remove them, and when I realized, I drafted this PR to think about whether it would still make sense to remove them. Now I think that they do have uses that can't be covered by the other methods, so this PR is best closed. (That being said, the engine itself doesn't use them, and a Github search only brought up about a dozen uses in the wild, and only part of those followed the Safety contract properly, so it might still make sense to remove them in the future)

@Victoronz Victoronz closed this Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Usability A simple quality-of-life change that makes Bevy easier to use D-Straightforward Simple bug fixes and API improvements, docs, test and examples D-Unsafe Touches with unsafe code in some way S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants