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

[Merged by Bors] - Implement direct mutable dereferencing #2100

Closed

Conversation

TheRawMeatball
Copy link
Member

This PR adds a way to get the underlying mutable reference for it's full lifetime.

Context:
https://discord.com/channels/691052431525675048/692572690833473578/839255317287796796

@BoxyUwU
Copy link
Member

BoxyUwU commented May 4, 2021

we should likely not call this method deref_mut as it conflicts with the trait- perhaps into_inner?

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use labels May 4, 2021
@cart
Copy link
Member

cart commented May 5, 2021

Seems reasonable to me! Maybe a bit counterintuitive to use in practice / users hitting this error will likely find it hard to resolve, but this seems like a fundamental limitation of smart pointers?

@cart
Copy link
Member

cart commented May 5, 2021

bors r+

bors bot pushed a commit that referenced this pull request May 5, 2021
This PR adds a way to get the underlying mutable reference for it's full lifetime.

Context:
https://discord.com/channels/691052431525675048/692572690833473578/839255317287796796
@bors bors bot changed the title Implement direct mutable dereferencing [Merged by Bors] - Implement direct mutable dereferencing May 5, 2021
@bors bors bot closed this May 5, 2021
ostwilkens pushed a commit to ostwilkens/bevy that referenced this pull request Jul 27, 2021
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 targeted quality-of-life change that makes Bevy easier to use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants