remove unnecessary struct

This commit is contained in:
Leigh Oliver
2025-01-01 10:14:16 +00:00
committed by Mitchell Hashimoto
parent b7b5b9bbf5
commit 8c1ad59de7

View File

@ -122,14 +122,12 @@ pub fn remove(self: *Tab) void {
}
/// Helper function to check if any surface in the split hierarchy needs close confirmation
const needsConfirm = struct {
fn check(elem: Surface.Container.Elem) bool {
fn needsConfirm(elem: Surface.Container.Elem) bool {
return switch (elem) {
.surface => |s| s.core_surface.needsConfirmQuit(),
.split => |s| check(s.top_left) or check(s.bottom_right),
.split => |s| needsConfirm(s.top_left) or needsConfirm(s.bottom_right),
};
}
}.check;
/// Close the tab, asking for confirmation if any surface requests it.
fn closeWithConfirmation(tab: *Tab) void {