aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/Shared/Model/DNSServer.swift
diff options
context:
space:
mode:
Diffstat (limited to 'WireGuard/Shared/Model/DNSServer.swift')
-rw-r--r--WireGuard/Shared/Model/DNSServer.swift24
1 files changed, 0 insertions, 24 deletions
diff --git a/WireGuard/Shared/Model/DNSServer.swift b/WireGuard/Shared/Model/DNSServer.swift
index 8703fbba..9078b598 100644
--- a/WireGuard/Shared/Model/DNSServer.swift
+++ b/WireGuard/Shared/Model/DNSServer.swift
@@ -12,30 +12,6 @@ struct DNSServer {
}
}
-extension DNSServer: Codable {
- public func encode(to encoder: Encoder) throws {
- var container = encoder.singleValueContainer()
- try container.encode(stringRepresentation)
- }
-
- public init(from decoder: Decoder) throws {
- let values = try decoder.singleValueContainer()
- let addressString = try values.decode(String.self)
-
- if let address = IPv4Address(addressString) {
- self.address = address
- } else if let address = IPv6Address(addressString) {
- self.address = address
- } else {
- throw DecodingError.invalidData
- }
- }
-
- enum DecodingError: Error {
- case invalidData
- }
-}
-
extension DNSServer {
var stringRepresentation: String {
return "\(address)"