diff --git a/App/UI/Keyboard/TerminalKeyInput.swift b/App/UI/Keyboard/TerminalKeyInput.swift index a0131ca..e8ef85e 100644 --- a/App/UI/Keyboard/TerminalKeyInput.swift +++ b/App/UI/Keyboard/TerminalKeyInput.swift @@ -89,14 +89,12 @@ class TerminalKeyInput: TextInputBase { inputAssistantItem.allowsHidingShortcuts = false if #available(iOS 16, *) { - #if swift(>=5.7) inputAssistantItem.leadingBarButtonGroups += [ .fixedGroup(items: [UIBarButtonItem(customView: leadingView)]) ] inputAssistantItem.trailingBarButtonGroups += [ .fixedGroup(items: [UIBarButtonItem(customView: trailingView)]) ] - #endif } else { inputAssistantItem.leadingBarButtonGroups += [ UIBarButtonItemGroup(barButtonItems: [UIBarButtonItem(customView: leadingView)], representativeItem: nil) diff --git a/App/UI/Settings/SettingsPerformanceView.swift b/App/UI/Settings/SettingsPerformanceView.swift index 45f6963..fcdb04c 100644 --- a/App/UI/Settings/SettingsPerformanceView.swift +++ b/App/UI/Settings/SettingsPerformanceView.swift @@ -13,10 +13,6 @@ struct SettingsPerformanceView: View { private struct RefreshRate: Hashable { var rate: Int var name: String - - func hash(into hasher: inout Hasher) { - hasher.combine(rate) - } } private let refreshRates = [ diff --git a/Common/VT100/StringSupplier.swift b/Common/VT100/StringSupplier.swift index 85cb329..5114d2c 100644 --- a/Common/VT100/StringSupplier.swift +++ b/Common/VT100/StringSupplier.swift @@ -10,15 +10,9 @@ import SwiftTerm import SwiftUI fileprivate extension View { - #if swift(>=5.7) static func + (lhs: Self, rhs: some View) -> AnyView { AnyView(ViewBuilder.buildBlock(lhs, AnyView(rhs))) } - #else - static func + (lhs: Self, rhs: AnyView) -> AnyView { - AnyView(ViewBuilder.buildBlock(lhs, rhs)) - } - #endif } open class StringSupplier { @@ -110,7 +104,7 @@ open class StringSupplier { font = attribute.style.contains(.italic) ? fontMetrics?.italicFont : fontMetrics?.regularFont } - let width = CGFloat(run.unicodeScalars.reduce(0, { $0 + UnicodeUtil.columnWidth(rune: $1) })) * fontMetrics!.width + let width = CGFloat(run.unicodeScalars.reduce(0, { $0 + UnicodeUtil.columnWidth(rune: $1) })) * (fontMetrics?.width ?? 0) return AnyView( Text(run)