Skip to content

Commit 16aed8c

Browse files
committed
Fix SwiftFormat warnings
1 parent d8e3cea commit 16aed8c

8 files changed

Lines changed: 0 additions & 14 deletions

File tree

Mist/AppDelegate.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
2929
func sendUpdateNotification(title: String, body: String, success: Bool, url: URL?) {
3030
let notificationCenter: UNUserNotificationCenter = .current()
3131
notificationCenter.getNotificationSettings { settings in
32-
3332
guard [.authorized, .provisional].contains(settings.authorizationStatus) else {
3433
return
3534
}
@@ -51,7 +50,6 @@ class AppDelegate: NSObject, NSApplicationDelegate {
5150
let request: UNNotificationRequest = .init(identifier: identifier, content: content, trigger: trigger)
5251

5352
notificationCenter.add(request) { error in
54-
5553
if let error: Error = error {
5654
print(error.localizedDescription)
5755
}

Mist/Helpers/DownloadManager.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ class DownloadManager: NSObject, ObservableObject {
2828
var completed: Bool = false
2929
// swiftlint:disable:next closure_body_length
3030
let completionHandler: (URL?, URLResponse?, Error?) -> Void = { url, _, error in
31-
3231
if let error: URLError = error as? URLError {
3332
guard error.code != .cancelled else {
3433
mistError = .userCancelled

Mist/Views/Activity/ActivityView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ struct ActivityView: View {
190190
case .userCancelled:
191191
return true
192192
case let .invalidTerminationStatus(status, _, _):
193-
194193
// SIGTERM triggered via Privileged Helper Tool due to user cancellation
195194
guard status == 15 else {
196195
return false

Mist/Views/ContentView.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ struct ContentView: View {
136136
refresh()
137137
}
138138
.onChange(of: copiedToClipboard) { copied in
139-
140139
guard copied else {
141140
return
142141
}
@@ -166,7 +165,6 @@ struct ContentView: View {
166165

167166
switch type {
168167
case .firmware:
169-
170168
for firmware in filteredFirmwares {
171169
let releaseName: String = firmware.name.replacingOccurrences(of: " beta", with: "")
172170

@@ -175,7 +173,6 @@ struct ContentView: View {
175173
}
176174
}
177175
case .installer:
178-
179176
for installer in filteredInstallers {
180177
let releaseName: String = installer.name.replacingOccurrences(of: " beta", with: "")
181178

Mist/Views/List/ListRowFirmware.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ struct ListRowFirmware: View {
9999
}
100100
}
101101
.onChange(of: showSavePanel) { boolean in
102-
103102
if boolean {
104103
save()
105104
}

Mist/Views/List/ListRowInstaller.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,11 @@ struct ListRowInstaller: View {
111111
alert(for: alertType)
112112
}
113113
.onChange(of: showOpenPanel) { boolean in
114-
115114
if boolean {
116115
open()
117116
}
118117
}
119118
.onChange(of: volume) { volume in
120-
121119
if volume != nil {
122120
createBootableInstaller()
123121
}

Mist/Views/Settings/SettingsGeneralNotificationsView.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ struct SettingsGeneralNotificationsView: View {
4646
private func validateNotifications() {
4747
let notificationCenter: UNUserNotificationCenter = .current()
4848
notificationCenter.getNotificationSettings { settings in
49-
5049
guard [.authorized, .provisional].contains(settings.authorizationStatus) else {
5150
enableNotifications = false
5251
return
@@ -59,7 +58,6 @@ struct SettingsGeneralNotificationsView: View {
5958
let options: UNAuthorizationOptions = [.alert, .badge, .sound]
6059

6160
userNotificationCenter.requestAuthorization(options: options) { success, _ in
62-
6361
guard success else {
6462
enableNotifications = false
6563
showAlert = true

MistHelperTool/main.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ enum HelperToolCommandRunner {
2121
static func run(_ request: HelperToolCommandRequest) throws -> HelperToolCommandResponse {
2222
switch request.type {
2323
case .remove:
24-
2524
guard let path: String = request.arguments.first else {
2625
return HelperToolCommandResponse(terminationStatus: 1, standardOutput: nil, standardError: "Invalid URL: \(request.arguments)")
2726
}
@@ -37,7 +36,6 @@ enum HelperToolCommandRunner {
3736
return HelperToolCommandResponse(terminationStatus: 1, standardOutput: nil, standardError: error.localizedDescription)
3837
}
3938
case .fileAttributes:
40-
4139
guard
4240
let path: String = request.arguments.first,
4341
let ownerAccountName: String = request.arguments.last else {

0 commit comments

Comments
 (0)