macos: swiftlint 'unused_closure_parameter' rule

This commit is contained in:
Jon Parise
2026-02-19 18:57:43 -05:00
parent 540adb0da3
commit a36d2f5420
3 changed files with 3 additions and 4 deletions

View File

@@ -24,7 +24,6 @@ disabled_rules:
- orphaned_doc_comment
- shorthand_operator
- switch_case_alignment
- unused_closure_parameter
- unused_enumerated
- unused_optional_binding
- vertical_parameter_alignment

View File

@@ -151,7 +151,7 @@ class TransparentTitlebarTerminalWindow: TerminalWindow {
tabGroupWindowsObservation = tabGroup.observe(
\.windows,
options: [.new]
) { [weak self] _, change in
) { [weak self] _, _ in
// NOTE: At one point, I guarded this on only if we went from 0 to N
// or N to 0 under the assumption that the tab bar would only get
// replaced on those cases. This turned out to be false (Tahoe).
@@ -175,7 +175,7 @@ class TransparentTitlebarTerminalWindow: TerminalWindow {
tabBarVisibleObservation = tabGroup?.observe(
\.isTabBarVisible,
options: [.new]
) { [weak self] _, change in
) { [weak self] _, _ in
guard let self else { return }
guard let lastSurfaceConfig else { return }
self.syncAppearance(lastSurfaceConfig)

View File

@@ -865,7 +865,7 @@ extension Ghostty {
// Key sequence indicator
if !keySequence.isEmpty {
HStack(alignment: .center, spacing: 4) {
ForEach(Array(keySequence.enumerated()), id: \.offset) { index, key in
ForEach(Array(keySequence.enumerated()), id: \.offset) { _, key in
KeyCap(key.description)
}