Skip to content

Commit

Permalink
Use updated spelling for protocols
Browse files Browse the repository at this point in the history
  • Loading branch information
vsanthanam committed Jun 7, 2022
1 parent 36c8995 commit 0576861
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public final class NetworkMonitor {
/// - Parameter delegate: The delegate object used to recieve updates
///
/// - Note: The monitor begins observing and publishing updates immediately
public convenience init(delegate: NetworkMonitorDelegate) {
public convenience init(delegate: any NetworkMonitorDelegate) {
self.init(pathMonitor: .init(),
updateHandler: nil,
delegate: delegate,
Expand All @@ -98,7 +98,7 @@ public final class NetworkMonitor {
///
/// - Note: The monitor begins observing and publishing updates immediately
public convenience init(requiredInterfaceType: NWInterface.InterfaceType,
delegate: NetworkMonitorDelegate) {
delegate: any NetworkMonitorDelegate) {
self.init(pathMonitor: .init(requiredInterfaceType: requiredInterfaceType),
updateHandler: nil,
delegate: delegate,
Expand All @@ -114,7 +114,7 @@ public final class NetworkMonitor {
/// - Note: The monitor begins observing and publishing updates immediately
@available(macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0, *)
public convenience init(prohibitedInterfaceTypes: [NWInterface.InterfaceType],
delegate: NetworkMonitorDelegate) {
delegate: any NetworkMonitorDelegate) {
self.init(pathMonitor: .init(prohibitedInterfaceTypes: prohibitedInterfaceTypes),
updateHandler: nil,
delegate: delegate,
Expand Down Expand Up @@ -174,7 +174,7 @@ public final class NetworkMonitor {
/// See ``NetworkMonitorDelegate`` for more information
///
/// - Tip: The delegate only recieves status changes that occured after it was assigned. To ensure that the delegate recieves every network path change, pass in the delegate on initialization of the monitor.
public weak var delegate: NetworkMonitorDelegate?
public weak var delegate: (any NetworkMonitorDelegate)?

/// The closure used to observe reachability updates
///
Expand All @@ -200,7 +200,7 @@ public final class NetworkMonitor {

private init(pathMonitor: NWPathMonitor,
updateHandler: UpdateHandler?,
delegate: NetworkMonitorDelegate?,
delegate: (any NetworkMonitorDelegate)?,
continuation: ((NWPath) -> Void)?) {
self.pathMonitor = pathMonitor
self.updateHandler = updateHandler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public final class ReachabilityMonitor {
/// - Note: A reachability monitor begins observing and publishing reachability updates immediately after initialization.
///
/// - Throws: An error of type ``Error``
public convenience init(delegate: ReachabilityMonitorDelegate) throws {
public convenience init(delegate: any ReachabilityMonitorDelegate) throws {
self.init(ref: try .general,
updateHandler: nil,
delegate: delegate)
Expand Down Expand Up @@ -119,7 +119,7 @@ public final class ReachabilityMonitor {
/// See ``ReachabilityMonitorDelegate`` for more information.
///
/// - Tip: The delegate only recieves status changes that occured after it was assigned. To recieve every status update, including the reachability status at the time the monitor was initialized, pass in the delegate on initialization of the monitor.
public weak var delegate: ReachabilityMonitorDelegate?
public weak var delegate: (any ReachabilityMonitorDelegate)?

/// The current reachability status
///
Expand Down Expand Up @@ -161,7 +161,7 @@ public final class ReachabilityMonitor {

private init(ref: SCNetworkReachability,
updateHandler: UpdateHandler?,
delegate: ReachabilityMonitorDelegate?,
delegate: (any ReachabilityMonitorDelegate)?,
continuation: ((Result) -> Void)? = nil) {
self.ref = ref
self.updateHandler = updateHandler
Expand Down

0 comments on commit 0576861

Please sign in to comment.