2
0
Эх сурвалжийг харах

Merge pull request #1724 from wogus3602/master

Modified for convention
Wei Wang 4 жил өмнө
parent
commit
a00becfe57

+ 1 - 1
Sources/Utility/CallbackQueue.swift

@@ -71,7 +71,7 @@ extension DispatchQueue {
     // This method will dispatch the `block` to self.
     // This method will dispatch the `block` to self.
     // If `self` is the main queue, and current thread is main thread, the block
     // If `self` is the main queue, and current thread is main thread, the block
     // will be invoked immediately instead of being dispatched.
     // will be invoked immediately instead of being dispatched.
-    func safeAsync(_ block: @escaping ()->()) {
+    func safeAsync(_ block: @escaping () -> Void) {
         if self === DispatchQueue.main && Thread.isMainThread {
         if self === DispatchQueue.main && Thread.isMainThread {
             block()
             block()
         } else {
         } else {

+ 1 - 1
Tests/KingfisherTests/KingfisherTestHelper.swift

@@ -99,7 +99,7 @@ func clearCaches(_ caches: [ImageCache]) {
     }
     }
 }
 }
 
 
-func delay(_ time: Double, block: @escaping ()->()) {
+func delay(_ time: Double, block: @escaping () -> Void) {
     DispatchQueue.main.asyncAfter(deadline: .now() + time) { block() }
     DispatchQueue.main.asyncAfter(deadline: .now() + time) { block() }
 }
 }