Explorar o código

Merge pull request #200 from johnnywjy/master

simplify map expression
Wei Wang %!s(int64=10) %!d(string=hai) anos
pai
achega
e6a2eeacd2
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      Kingfisher/ImageCache.swift

+ 2 - 4
Kingfisher/ImageCache.swift

@@ -484,10 +484,8 @@ extension ImageCache {
             dispatch_async(dispatch_get_main_queue(), { () -> Void in
                 
                 if URLsToDelete.count != 0 {
-                    let cleanedHashes = URLsToDelete.map({ (url) -> String in
-                        return url.lastPathComponent!
-                    })
-                    
+                    let cleanedHashes = URLsToDelete.map( {$0.lastPathComponent!} )
+
                     NSNotificationCenter.defaultCenter().postNotificationName(KingfisherDidCleanDiskCacheNotification, object: self, userInfo: [KingfisherDiskCacheCleanedHashKey: cleanedHashes])
                 }