Handle unknown enum defaults

This commit is contained in:
Davide De Rosa 2019-03-30 20:23:09 +01:00
parent 596ec00943
commit 8dfd5f23c1
4 changed files with 6 additions and 0 deletions

View File

@ -48,6 +48,7 @@ extension NWTCPConnectionState: CustomStringConvertible {
case .disconnected: return "disconnected"
case .invalid: return "invalid"
case .waiting: return "waiting"
@unknown default: return "???"
}
}
}

View File

@ -48,6 +48,7 @@ extension NWUDPSessionState: CustomStringConvertible {
case .preparing: return "preparing"
case .ready: return "ready"
case .waiting: return "waiting"
@unknown default: return "???"
}
}
}

View File

@ -627,6 +627,9 @@ extension TunnelKitProvider {
case .LZO:
return .lzo
default:
break
}
} else if let se = error as? SessionError {
switch se {

View File

@ -156,6 +156,7 @@ extension PacketCode: CustomStringConvertible {
case .hardResetServerV2: return "HARD_RESET_SERVER_V2"
case .dataV2: return "DATA_V2"
case .unknown: return "UNKNOWN"
@unknown default: return "UNKNOWN"
}
}
}