mirror of
https://github.com/ninxsoft/Mist.git
synced 2025-05-31 23:38:24 -04:00
SwiftFormat hoistPatternLet
This commit is contained in:
parent
175dbe4ee5
commit
24f70abee7
2 changed files with 9 additions and 9 deletions
|
@ -27,11 +27,11 @@ enum MistError: Error, Equatable {
|
||||||
|
|
||||||
var description: String {
|
var description: String {
|
||||||
switch self {
|
switch self {
|
||||||
case .generalError(let string):
|
case let .generalError(string):
|
||||||
return "Error: \(string)"
|
return "Error: \(string)"
|
||||||
case .chunklistValidationError(let string):
|
case let .chunklistValidationError(string):
|
||||||
return "Chunklist validation failed: \(string)"
|
return "Chunklist validation failed: \(string)"
|
||||||
case .fileSizeAttributesError(let url):
|
case let .fileSizeAttributesError(url):
|
||||||
return "Unble to retrieve file size from file '\(url.path)'"
|
return "Unble to retrieve file size from file '\(url.path)'"
|
||||||
case .invalidData:
|
case .invalidData:
|
||||||
return "Invalid data"
|
return "Invalid data"
|
||||||
|
@ -39,11 +39,11 @@ enum MistError: Error, Equatable {
|
||||||
return "Invalid destination URL"
|
return "Invalid destination URL"
|
||||||
case .invalidDownloadResumeData:
|
case .invalidDownloadResumeData:
|
||||||
return "Invalid download resume data"
|
return "Invalid download resume data"
|
||||||
case .invalidFileSize(let invalid, let valid):
|
case let .invalidFileSize(invalid, valid):
|
||||||
return "Invalid File Size: '\(invalid)', should be: '\(valid)'"
|
return "Invalid File Size: '\(invalid)', should be: '\(valid)'"
|
||||||
case .invalidShasum(let invalid, let valid):
|
case let .invalidShasum(invalid, valid):
|
||||||
return "Invalid Shasum: '\(invalid)', should be: '\(valid)'"
|
return "Invalid Shasum: '\(invalid)', should be: '\(valid)'"
|
||||||
case .invalidTerminationStatus(let status, let output, let error):
|
case let .invalidTerminationStatus(status, output, error):
|
||||||
var string: String = "Invalid Termination Status: \(status)"
|
var string: String = "Invalid Termination Status: \(status)"
|
||||||
|
|
||||||
if
|
if
|
||||||
|
@ -59,7 +59,7 @@ enum MistError: Error, Equatable {
|
||||||
}
|
}
|
||||||
|
|
||||||
return string
|
return string
|
||||||
case .invalidURL(let url):
|
case let .invalidURL(url):
|
||||||
return "Invalid URL: '\(url)'"
|
return "Invalid URL: '\(url)'"
|
||||||
case .maximumRetriesReached:
|
case .maximumRetriesReached:
|
||||||
return "Maximum number of retries reached"
|
return "Maximum number of retries reached"
|
||||||
|
|
|
@ -143,7 +143,7 @@ struct ActivityView: View {
|
||||||
switch result {
|
switch result {
|
||||||
case .success:
|
case .success:
|
||||||
taskManager.taskGroups[taskGroupIndex].tasks[taskIndex].state = .complete
|
taskManager.taskGroups[taskGroupIndex].tasks[taskIndex].state = .complete
|
||||||
case .failure(let failure):
|
case let .failure(failure):
|
||||||
if checkForUserCancellation(failure) {
|
if checkForUserCancellation(failure) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,7 @@ struct ActivityView: View {
|
||||||
switch error {
|
switch error {
|
||||||
case .userCancelled:
|
case .userCancelled:
|
||||||
return true
|
return true
|
||||||
case .invalidTerminationStatus(let status, _, _):
|
case let .invalidTerminationStatus(status, _, _):
|
||||||
|
|
||||||
// SIGTERM triggered via Privileged Helper Tool due to user cancellation
|
// SIGTERM triggered via Privileged Helper Tool due to user cancellation
|
||||||
guard status == 15 else {
|
guard status == 15 else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue