mirror of
https://github.com/ninxsoft/Mist.git
synced 2025-06-02 16:19:53 -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
|
.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
|
enumeratorError = error
|
||||||
return false
|
return false
|
||||||
}) else {
|
}) else {
|
||||||
|
|
|
@ -10,11 +10,11 @@ import Yams
|
||||||
|
|
||||||
extension Sequence where Iterator.Element == [String: Any] {
|
extension Sequence where Iterator.Element == [String: Any] {
|
||||||
func firmwaresCSVString() -> String {
|
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 {
|
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 {
|
func jsonString() throws -> String {
|
||||||
|
|
|
@ -26,7 +26,7 @@ extension String {
|
||||||
static let tccDatabasePath: String = "/Library/Application Support/com.apple.TCC/TCC.db"
|
static let tccDatabasePath: String = "/Library/Application Support/com.apple.TCC/TCC.db"
|
||||||
|
|
||||||
func stringWithSubstitutions(name: String, version: String, build: String) -> String {
|
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: "%VERSION%", with: version)
|
||||||
.replacingOccurrences(of: "%BUILD%", with: build)
|
.replacingOccurrences(of: "%BUILD%", with: build)
|
||||||
.replacingOccurrences(of: "//", with: "/")
|
.replacingOccurrences(of: "//", with: "/")
|
||||||
|
|
|
@ -16,7 +16,7 @@ extension URL {
|
||||||
.totalFileAllocatedSizeKey
|
.totalFileAllocatedSizeKey
|
||||||
]
|
]
|
||||||
|
|
||||||
let resourceValues: URLResourceValues = try self.resourceValues(forKeys: urlResourceKeys)
|
let resourceValues: URLResourceValues = try resourceValues(forKeys: urlResourceKeys)
|
||||||
|
|
||||||
guard let isRegularFile: Bool = resourceValues.isRegularFile,
|
guard let isRegularFile: Bool = resourceValues.isRegularFile,
|
||||||
isRegularFile else {
|
isRegularFile else {
|
||||||
|
|
|
@ -148,7 +148,7 @@ struct ActivityView: View {
|
||||||
}
|
}
|
||||||
|
|
||||||
taskManager.taskGroups[taskGroupIndex].tasks[taskIndex].state = .error
|
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
|
alertType = .error
|
||||||
showAlert = true
|
showAlert = true
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue