From d482fed7f2e7d6433238781abfea9a22b0e61ab0 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 7 Nov 2023 15:26:41 -0800 Subject: [PATCH] simplify some swift --- macos/Sources/Ghostty/Ghostty.TerminalSplit.swift | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/macos/Sources/Ghostty/Ghostty.TerminalSplit.swift b/macos/Sources/Ghostty/Ghostty.TerminalSplit.swift index 9127a2e13..2d4b7881e 100644 --- a/macos/Sources/Ghostty/Ghostty.TerminalSplit.swift +++ b/macos/Sources/Ghostty/Ghostty.TerminalSplit.swift @@ -139,13 +139,8 @@ extension Ghostty { } func onEqualize(notification: SwiftUI.Notification) { - // If there are no splits then there is nothing to do - switch (node) { - case .split(let c): - _ = c.equalize() - default: - return - } + guard case .split(let c) = node else { return } + _ = c.equalize() } }