Sfoglia il codice sorgente

refactor: swiftlint

Sam Jaffe 1 settimana fa
parent
commit
17ed4f508a

+ 5 - 7
Todos/Controller/RotateController.swift

@@ -20,7 +20,7 @@ final class RotateController {
     rotate(items, &tracking)
     date = Date()
   }
-  
+
   func summarize(_ items: [Project]) -> String? {
     var summary = ""
     for item in items {
@@ -45,16 +45,14 @@ final class RotateController {
     }
   }
 
-  private func isComplete<T : Filterable>(_ arg: T) -> Bool {
+  private func isComplete<T: Filterable>(_ arg: T) -> Bool {
     arg.status == .complete
   }
 
-  private func cleanStatuses<T : Filterable>(_ items: inout [T]) {
+  private func cleanStatuses<T: Filterable>(_ items: inout [T]) {
     items.removeAll(where: isComplete)
-    for var item in items {
-      if item.status == .inProgress {
-        item.status = .todo
-      }
+    for var item in items where item.status == .inProgress {
+      item.status = .todo
     }
   }
 }

+ 1 - 1
Todos/ViewModel/RotateTracking.swift

@@ -14,6 +14,6 @@ final class RotateTracking {
   var hasTriggeredAutosave: Bool = false
   var manuallyInvoked: Bool = false
   var summary: String?
-  
+
   init() {}
 }