linebender / druid

A data-first Rust-native UI design toolkit.
https://linebender.org/druid/
Apache License 2.0
9.57k stars 566 forks source link

Add type_name to panic error messages in WidgetPod #2380

Closed matthewgapp closed 1 year ago

matthewgapp commented 1 year ago

Hey, just started tinkering with Druid and think that it could work well for my current project. Even though it's "discontinued", I'd like to start contributing to soften some of the rough edges while Xilem gets off the ground.

This PR introduces a super small change, adding the typename to the panic messages. I ran into this while running down a another bug in my app. I couldn't make heads or tails about which component was causing issues because WidgetPod is used under the hood in so many places. I think adding information. about which type is experiencing the panic will be helpful to others, too.

jaredoconnell commented 1 year ago

I haven't tested this, but this looks valuable to me.

matthewgapp commented 1 year ago

Thanks for the PR! It looks like some auto-formatter got run on the changelog, right? Seems harmless, though...

Edit: it looks like we'll have to figure out the CI failures, though... my initial guess is that some mac dependency broke semver...

thanks, I removed the unnecessary formatting.