Skip to content

Give a WinHandler to the idle callback.#1787

Merged
jneem merged 2 commits intolinebender:masterfrom
jneem:idle
May 19, 2021
Merged

Give a WinHandler to the idle callback.#1787
jneem merged 2 commits intolinebender:masterfrom
jneem:idle

Conversation

@jneem
Copy link
Member

@jneem jneem commented May 19, 2021

I asked about this on zulip and no one replied, so I'm guessing that the reasons for the existing signature of add_idle_callback were lost in the mists of time. It used to be that an idle callback got a &dyn Any, but that Any is always just the WinHandler (so, DruidHandler in all druid apps). Since &DruidHandler isn't much use (all the interesting things are &mut), I'm guessing that no one was really using it.

Copy link
Contributor

@raphlinus raphlinus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems right to me. I'm the one who did the original dyn Any, but I don't think the justification for that was ever very strong (I wanted to loose coupling so druid-shell wouldn't overly specify the higher levels, but I don't see this change really taking away from that).

@jneem jneem merged commit b348f48 into linebender:master May 19, 2021
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