Skip to content

Fix confirm-remove dialog close handling#662

Merged
multiplex55 merged 1 commit intomasterfrom
codex/fix-mutable-borrow-errors-in-dashboard_editor_dialog
Jan 8, 2026
Merged

Fix confirm-remove dialog close handling#662
multiplex55 merged 1 commit intomasterfrom
codex/fix-mutable-borrow-errors-in-dashboard_editor_dialog

Conversation

@multiplex55
Copy link
Copy Markdown
Owner

Motivation

  • Prevent a Rust borrow-checker conflict caused by mutating open inside the egui::Window::show closure which borrows open mutably twice.
  • Ensure dialog close requests triggered from UI buttons are handled without violating borrow rules.
  • Remove unnecessary mutability on the slot removal tracking variable to simplify the code.

Description

  • Added a local should_close flag and set open = false after the show call to defer closing outside the closure and avoid double mutable borrows.
  • Replaced in-closure assignments to open with assignments to should_close.
  • Removed the redundant mut on the removed variable by changing let mut removed = ... to let removed = ....
  • Changes are localized to src/gui/dashboard_editor_dialog.rs around the confirm-remove dialog handling.

Testing

  • No automated tests or builds were run as part of this change.
  • No test failures reported (no tests executed).

Codex Task

@multiplex55 multiplex55 merged commit 1542a3a into master Jan 8, 2026
1 check passed
@multiplex55 multiplex55 deleted the codex/fix-mutable-borrow-errors-in-dashboard_editor_dialog branch January 9, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant