macos: swiftlint 'unused_enumerated' rule (#10888)

pull/10898/head
Mitchell Hashimoto 2026-02-20 09:43:38 -08:00 committed by GitHub
commit 3ba6d8174d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View File

@ -22,7 +22,6 @@ disabled_rules:
- multiple_closures_with_trailing_closure
- no_fallthrough_only
- switch_case_alignment
- unused_enumerated
identifier_name:
min_length: 1

View File

@ -1544,7 +1544,7 @@ extension TerminalController {
case #selector(closeTabsOnTheRight):
guard let window, let tabGroup = window.tabGroup else { return false }
guard let currentIndex = tabGroup.windows.firstIndex(of: window) else { return false }
return tabGroup.windows.enumerated().contains { $0.offset > currentIndex }
return tabGroup.windows.indices.contains { $0 > currentIndex }
case #selector(returnToDefaultSize):
guard let window else { return false }