Skip to content

Conversation

@PoignardAzur
Copy link
Contributor

This lets us remove the Drop impl for WidgetMut, which makes it easier to use without making the borrow checker mad.

This lets us remove the Drop impl for WidgetMut, which makes it easier to use without making the borrow checker mad.
@PoignardAzur
Copy link
Contributor Author

This is something I've thought about during RustWeek; smart references are much easier to use when they don't have a Drop impl (because the borrow checker doesn't assume that the reference will be mutated when dropped).

I'm not sure about the implementation I just pushed, though. I'm thinking the flags should probably be updated in the update_widget_tree pass. Documenting that might be a pain.

@PoignardAzur PoignardAzur changed the title [Draft] Refactor WidgetMut to remove parent_state reference DRAFT: Refactor WidgetMut to remove parent_state reference Aug 13, 2025
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