aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard/Shared/Model/IPAddressRange.swift
diff options
context:
space:
mode:
Diffstat (limited to 'WireGuard/Shared/Model/IPAddressRange.swift')
-rw-r--r--WireGuard/Shared/Model/IPAddressRange.swift19
1 files changed, 0 insertions, 19 deletions
diff --git a/WireGuard/Shared/Model/IPAddressRange.swift b/WireGuard/Shared/Model/IPAddressRange.swift
index da4cbd5e..28f3d005 100644
--- a/WireGuard/Shared/Model/IPAddressRange.swift
+++ b/WireGuard/Shared/Model/IPAddressRange.swift
@@ -52,22 +52,3 @@ extension IPAddressRange {
return (address, networkPrefixLength)
}
}
-
-extension IPAddressRange: 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)
- guard let parsed = IPAddressRange.parseAddressString(addressString) else { throw DecodingError.invalidData }
- address = parsed.0
- networkPrefixLength = parsed.1
- }
-
- enum DecodingError: Error {
- case invalidData
- }
-}