Properly handle user callbacks in surface_configure #4227
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
cargo clippy
.Connections
I did a sloppy job of fixing this in #4220.
Fixes #4214.
Description
Fix the fix. The initial patch was handling user callbacks only in some cases, missing that there was a
return None;
at the end of the block. This nests most of the loop into an additional block to reduce the scope of the locks while still handling the user callbacks in the loop as the portion outside of the loop is only taken when an error occurs.