From 8c1ad59de761153023fba73913bb168df91c55d5 Mon Sep 17 00:00:00 2001 From: Leigh Oliver Date: Wed, 1 Jan 2025 10:14:16 +0000 Subject: [PATCH] remove unnecessary struct --- src/apprt/gtk/Tab.zig | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/apprt/gtk/Tab.zig b/src/apprt/gtk/Tab.zig index 1a3b44136..6e28b8644 100644 --- a/src/apprt/gtk/Tab.zig +++ b/src/apprt/gtk/Tab.zig @@ -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 { - return switch (elem) { - .surface => |s| s.core_surface.needsConfirmQuit(), - .split => |s| check(s.top_left) or check(s.bottom_right), - }; - } -}.check; +fn needsConfirm(elem: Surface.Container.Elem) bool { + return switch (elem) { + .surface => |s| s.core_surface.needsConfirmQuit(), + .split => |s| needsConfirm(s.top_left) or needsConfirm(s.bottom_right), + }; +} /// Close the tab, asking for confirmation if any surface requests it. fn closeWithConfirmation(tab: *Tab) void {