Skip to content

Commit 6dedd90

Browse files
fix: build with Xcode 27
1 parent 737df5b commit 6dedd90

7 files changed

Lines changed: 13 additions & 13 deletions

File tree

‎Coder-Desktop/Coder-Desktop/VPN/VPNSystemExtension.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Foundation
22
import os
33
import SystemExtensions
44

5-
enum SystemExtensionState: Equatable, Sendable {
5+
enum SystemExtensionState: Equatable {
66
case uninstalled
77
case needsUserApproval
88
case installed

‎Coder-Desktop/Coder-Desktop/Views/ButtonRow.swift‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import SwiftUI
22

33
struct ButtonRowView<Label: View>: View {
4-
init(highlightColor: Color = .accentColor, isSelected: Bool = false, label: @escaping () -> Label) {
4+
init(highlightColor: Color = .accentColor, isSelected: Bool = false, @ViewBuilder label: () -> Label) {
55
self.highlightColor = highlightColor
6-
self.isSelected = isSelected
7-
self.label = label
6+
_isSelected = State(initialValue: isSelected)
7+
self.label = label()
88
}
99

1010
let highlightColor: Color
11-
@State private var isSelected: Bool = false
12-
@ViewBuilder var label: () -> Label
11+
@State private var isSelected: Bool
12+
let label: Label
1313

1414
var body: some View {
1515
HStack(spacing: 0) {
16-
label()
16+
label
1717
Spacer()
1818
}
1919
.padding(.horizontal, Theme.Size.trayPadding)

‎Coder-Desktop/Coder-Desktop/Views/Util.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private struct ActivationPolicyModifier: ViewModifier {
5555
NSApp.setActivationPolicy(.regular)
5656
}
5757
.onDisappear {
58-
if NSApp.windows.filter({ $0.level != .statusBar && $0.isVisible }).count <= 1 {
58+
if NSApp.windows.count(where: { $0.level != .statusBar && $0.isVisible }) <= 1 {
5959
NSApp.setActivationPolicy(.accessory)
6060
}
6161
}

‎Coder-Desktop/CoderSDK/HTTP.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public struct HTTPHeader: Sendable, Codable {
1515
}
1616
}
1717

18-
enum HTTPMethod: String, Equatable, Hashable, Sendable {
18+
enum HTTPMethod: String, Equatable, Hashable {
1919
case get = "GET"
2020
case post = "POST"
2121
case delete = "DELETE"

‎Coder-Desktop/CoderSDK/UserAgent.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public enum CoderComponent: String, Sendable {
77
}
88

99
/// Go's `GOARCH` spelling, so a single pattern matches the CLI, the vpn-daemon and Desktop client.
10-
enum GoArch: String, Sendable {
10+
enum GoArch: String {
1111
case arm64
1212
case amd64
1313
}

‎Coder-Desktop/VPNLibTests/CoderRouterTests.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ struct CoderRouterTests {
1212
router = CoderRouter()
1313
}
1414

15-
struct RouteTestCase: CustomStringConvertible, Sendable {
15+
struct RouteTestCase: CustomStringConvertible {
1616
let urlString: String
1717
let expectedRoute: CoderRoute?
1818
let description: String

‎Coder-Desktop/VPNLibTests/SpeakerTests.swift‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Testing
33
@testable import VPNLib
44

55
@Suite(.timeLimit(.minutes(1)))
6-
struct SpeakerTests: Sendable {
6+
struct SpeakerTests {
77
let pipeMT = Pipe()
88
let pipeTM = Pipe()
99
let uut: Speaker<Vpn_TunnelMessage, Vpn_ManagerMessage>
@@ -121,7 +121,7 @@ struct SpeakerTests: Sendable {
121121
}
122122

123123
@Suite(.timeLimit(.minutes(1)))
124-
struct ManagerSpeakerTests: Sendable {
124+
struct ManagerSpeakerTests {
125125
let pipeMT = Pipe()
126126
let pipeTM = Pipe()
127127
let queue: DispatchQueue = .global(qos: .utility)

0 commit comments

Comments
 (0)