Skip to content

Remove suspicious unwraps added in 799027d #184

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
merged 3 commits into from
Jun 23, 2025

Conversation

En-En-Code
Copy link
Contributor

Found this regression after crashing xwls about 2 seconds after opening Chaterino7 due to creating a stale surface. The offending unwrap is hit since the query get call is what finds the stale surface, rather than the construction of the query in query_one.

I took a rough look over the rest of that commit, and found a few additional blocks structured the same way and refactored them to also account for the split in query construction and query execution failures.

Doing double let else is a smidge unergonomic, but the query has to be held for the duration of the things it gets, so probably not a better way.

Regression from 799027d. Unwraps on a None value when doing the stale surface generation technique in Chatterino7 as described in Supreeeme#74, very consistent
The wl_keyboard Enter event, wl_keyboard Leave event, the wl_touch
Self::Down event and the ServerState::reconfigure_window function had
similar uses of `unwrap` which appear to not consider the distinct
query preparation and query execution stages.
Copy link
Owner

@Supreeeme Supreeeme left a comment

Choose a reason for hiding this comment

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

Good catch!

@Supreeeme Supreeeme merged commit 117af56 into Supreeeme:main Jun 23, 2025
3 checks passed
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