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

refactor!: Make ActionHandler::do_action take &mut self #296

Merged
merged 1 commit into from
Sep 23, 2023

Conversation

mwcampbell
Copy link
Contributor

I believe this isn't controversial like my previous, abandoned PR or the other API change I'm currently considering. I'm pretty sure it's conceptually correct, because an action handler needs to mutate the application's state, and it's better to have the platform adapters handle interior mutability in the way that's appropriate for each platform's threading requirements than to make the user do it. This simplifies the winit adapter and makes the C API a bit safer.

@mwcampbell mwcampbell merged commit 4fc7846 into main Sep 23, 2023
@mwcampbell mwcampbell deleted the action-handler-mut branch September 23, 2023 14:38
@mwcampbell mwcampbell mentioned this pull request Sep 23, 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