Browse Source

strongSelf turned to only self. (Swift 4.2)

https://github.com/apple/swift-evolution/blob/master/proposals/0079-upgrade-self-from-weak-to-strong.md#proposed-solution
Batuhan Saka 7 years ago
parent
commit
e381039d62
1 changed files with 3 additions and 3 deletions
  1. 3 3
      Sources/Reachability.swift

+ 3 - 3
Sources/Reachability.swift

@@ -238,9 +238,9 @@ fileprivate extension Reachability {
         let block = connection != .none ? whenReachable : whenUnreachable
 
         DispatchQueue.main.async { [weak self] in
-            guard let strongSelf = self else { return }
-            block?(strongSelf)
-            strongSelf.notificationCenter.post(name: .reachabilityChanged, object: strongSelf)
+            guard let self = self else { return }
+            block?(self)
+            self.notificationCenter.post(name: .reachabilityChanged, object: self)
         }
     }
 }