From 1d7c5e88d93ea5aaf4d90c8a31389c36d678ebab Mon Sep 17 00:00:00 2001 From: Oleksii Dykan Date: Wed, 27 Dec 2017 19:20:31 +0100 Subject: [PATCH] remove unused structs --- .../TestCodableFirebase.swift | 42 ------------------- 1 file changed, 42 deletions(-) diff --git a/CodableFirebaseTests/TestCodableFirebase.swift b/CodableFirebaseTests/TestCodableFirebase.swift index f7b2a11..0d4ecc5 100644 --- a/CodableFirebaseTests/TestCodableFirebase.swift +++ b/CodableFirebaseTests/TestCodableFirebase.swift @@ -857,45 +857,3 @@ fileprivate struct OptionalTopLevelWrapper : Codable, Equatable where T : Cod return lhs.value == rhs.value } } - -fileprivate struct FloatNaNPlaceholder : Codable, Equatable { - init() {} - - func encode(to encoder: Encoder) throws { - var container = encoder.singleValueContainer() - try container.encode(Float.nan) - } - - init(from decoder: Decoder) throws { - let container = try decoder.singleValueContainer() - let float = try container.decode(Float.self) - if !float.isNaN { - throw DecodingError.dataCorrupted(DecodingError.Context(codingPath: decoder.codingPath, debugDescription: "Couldn't decode NaN.")) - } - } - - static func ==(_ lhs: FloatNaNPlaceholder, _ rhs: FloatNaNPlaceholder) -> Bool { - return true - } -} - -fileprivate struct DoubleNaNPlaceholder : Codable, Equatable { - init() {} - - func encode(to encoder: Encoder) throws { - var container = encoder.singleValueContainer() - try container.encode(Double.nan) - } - - init(from decoder: Decoder) throws { - let container = try decoder.singleValueContainer() - let double = try container.decode(Double.self) - if !double.isNaN { - throw DecodingError.dataCorrupted(DecodingError.Context(codingPath: decoder.codingPath, debugDescription: "Couldn't decode NaN.")) - } - } - - static func ==(_ lhs: DoubleNaNPlaceholder, _ rhs: DoubleNaNPlaceholder) -> Bool { - return true - } -}