Skip to content

Commit

Permalink
Fix swift 6 related warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
buggmagnet committed Aug 19, 2024
1 parent a4ad185 commit 2b37ca7
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import Foundation
import MullvadTypes

extension DecodingError: CustomErrorDescriptionProtocol {
extension DecodingError: MullvadTypes.CustomErrorDescriptionProtocol {
public var customErrorDescription: String? {
switch self {
case let .typeMismatch(type, context):
Expand All @@ -30,7 +30,7 @@ extension DecodingError: CustomErrorDescriptionProtocol {
}
}

extension EncodingError: CustomErrorDescriptionProtocol {
extension EncodingError: MullvadTypes.CustomErrorDescriptionProtocol {
public var customErrorDescription: String? {
switch self {
case let .invalidValue(_, context):
Expand Down
2 changes: 1 addition & 1 deletion ios/MullvadVPN/Extensions/NEVPNStatus+Debug.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import NetworkExtension

extension NEVPNStatus: CustomStringConvertible {
extension NEVPNStatus: Swift.CustomStringConvertible {
public var description: String {
switch self {
case .connected:
Expand Down
2 changes: 1 addition & 1 deletion ios/MullvadVPN/Extensions/RESTError+Display.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
import MullvadREST
import MullvadTypes

extension REST.Error: DisplayError {
extension REST.Error: MullvadTypes.DisplayError {
public var displayErrorDescription: String? {
switch self {
case let .network(urlError):
Expand Down
2 changes: 1 addition & 1 deletion ios/MullvadVPN/Extensions/SKError+Localized.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import StoreKit

extension SKError: LocalizedError {
extension SKError: Foundation.LocalizedError {
public var errorDescription: String? {
switch code {
case .unknown:
Expand Down
8 changes: 6 additions & 2 deletions ios/PacketTunnelCore/Actor/PacketTunnelActor+SleepCycle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ extension PacketTunnelActor {
`NEPacketTunnelProvider` provides the corresponding lifecycle method.
*/
public nonisolated func onWake() {
tunnelMonitor.onWake()
Task {
await tunnelMonitor.onWake()
}
}

/**
Expand All @@ -24,6 +26,8 @@ extension PacketTunnelActor {
`NEPacketTunnelProvider` provides the corresponding lifecycle method.
*/
public nonisolated func onSleep() {
tunnelMonitor.onSleep()
Task {
await tunnelMonitor.onSleep()
}
}
}
2 changes: 1 addition & 1 deletion ios/PacketTunnelCore/Actor/PacketTunnelActor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public actor PacketTunnelActor {
for await event in channel {
guard let self else { return }

self.logger.debug("Received event: \(event.logFormat())")
await self.logger.debug("Received event: \(event.logFormat())")

let effects = await self.runReducer(event)

Expand Down

0 comments on commit 2b37ca7

Please sign in to comment.