Browse Source

Update for Xcode 8 beta 3

Ashley Mills 9 years ago
parent
commit
e15dfb57db
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Reachability/Reachability.swift

+ 2 - 2
Reachability/Reachability.swift

@@ -106,7 +106,7 @@ public class Reachability: NSObject {
     public convenience init(hostname: String) throws {
         
         guard let nodename = (hostname as NSString).utf8String,
-            ref = SCNetworkReachabilityCreateWithName(nil, nodename) else { throw ReachabilityError.FailedToCreateWithHostname(hostname) }
+            let ref = SCNetworkReachabilityCreateWithName(nil, nodename) else { throw ReachabilityError.FailedToCreateWithHostname(hostname) }
 
         self.init(reachabilityRef: ref)
     }
@@ -144,7 +144,7 @@ public class Reachability: NSObject {
     // MARK: - *** Notifier methods ***
     public func startNotifier() throws {
 
-        guard let reachabilityRef = reachabilityRef where !notifierRunning else { return }
+        guard let reachabilityRef = reachabilityRef, !notifierRunning else { return }
         
         var context = SCNetworkReachabilityContext(version: 0, info: nil, retain: nil, release: nil, copyDescription: nil)
         context.info = UnsafeMutablePointer<Void>(Unmanaged<Reachability>.passUnretained(self).toOpaque())