mirror of
https://github.com/ninxsoft/Mist.git
synced 2025-05-28 14:04:49 -04:00
SwiftFormat redundantSelf
This commit is contained in:
parent
03e6df305b
commit
13fdc52072
5 changed files with 6 additions and 6 deletions
|
@ -17,7 +17,7 @@ extension FileManager {
|
|||
.totalFileAllocatedSizeKey
|
||||
]
|
||||
|
||||
guard let enumerator: FileManager.DirectoryEnumerator = self.enumerator(at: url, includingPropertiesForKeys: Array(urlResourceKeys), options: [], errorHandler: { _, error -> Bool in
|
||||
guard let enumerator: FileManager.DirectoryEnumerator = enumerator(at: url, includingPropertiesForKeys: Array(urlResourceKeys), options: [], errorHandler: { _, error -> Bool in
|
||||
enumeratorError = error
|
||||
return false
|
||||
}) else {
|
||||
|
|
|
@ -10,11 +10,11 @@ import Yams
|
|||
|
||||
extension Sequence where Iterator.Element == [String: Any] {
|
||||
func firmwaresCSVString() -> String {
|
||||
"Signed,Name,Version,Build,Size,Date,Compatible\n" + self.map { $0.firmwareCSVString() }.joined()
|
||||
"Signed,Name,Version,Build,Size,Date,Compatible\n" + map { $0.firmwareCSVString() }.joined()
|
||||
}
|
||||
|
||||
func installersCSVString() -> String {
|
||||
"Identifier,Name,Version,Build,Size,Date,Compatible\n" + self.map { $0.installerCSVString() }.joined()
|
||||
"Identifier,Name,Version,Build,Size,Date,Compatible\n" + map { $0.installerCSVString() }.joined()
|
||||
}
|
||||
|
||||
func jsonString() throws -> String {
|
||||
|
|
|
@ -26,7 +26,7 @@ extension String {
|
|||
static let tccDatabasePath: String = "/Library/Application Support/com.apple.TCC/TCC.db"
|
||||
|
||||
func stringWithSubstitutions(name: String, version: String, build: String) -> String {
|
||||
self.replacingOccurrences(of: "%NAME%", with: name)
|
||||
replacingOccurrences(of: "%NAME%", with: name)
|
||||
.replacingOccurrences(of: "%VERSION%", with: version)
|
||||
.replacingOccurrences(of: "%BUILD%", with: build)
|
||||
.replacingOccurrences(of: "//", with: "/")
|
||||
|
|
|
@ -16,7 +16,7 @@ extension URL {
|
|||
.totalFileAllocatedSizeKey
|
||||
]
|
||||
|
||||
let resourceValues: URLResourceValues = try self.resourceValues(forKeys: urlResourceKeys)
|
||||
let resourceValues: URLResourceValues = try resourceValues(forKeys: urlResourceKeys)
|
||||
|
||||
guard let isRegularFile: Bool = resourceValues.isRegularFile,
|
||||
isRegularFile else {
|
||||
|
|
|
@ -148,7 +148,7 @@ struct ActivityView: View {
|
|||
}
|
||||
|
||||
taskManager.taskGroups[taskGroupIndex].tasks[taskIndex].state = .error
|
||||
self.error = failure as? MistError ?? MistError.generalError(failure.localizedDescription)
|
||||
error = failure as? MistError ?? MistError.generalError(failure.localizedDescription)
|
||||
alertType = .error
|
||||
showAlert = true
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue