From 4fc0e9708c2bb5610f2b6b260ab0d836750c78f9 Mon Sep 17 00:00:00 2001 From: Fabrizio Demaria Date: Fri, 5 Apr 2024 09:42:09 +0200 Subject: [PATCH] Remove unused converters --- Sources/Confidence/ConfidenceValue.swift | 72 ------------------------ 1 file changed, 72 deletions(-) diff --git a/Sources/Confidence/ConfidenceValue.swift b/Sources/Confidence/ConfidenceValue.swift index e16c5e29..af6fb272 100644 --- a/Sources/Confidence/ConfidenceValue.swift +++ b/Sources/Confidence/ConfidenceValue.swift @@ -168,78 +168,6 @@ private enum ConfidenceValueInternal: Equatable, Encodable { case list([ConfidenceValueInternal]) case structure([String: ConfidenceValueInternal]) case null - - public func asBoolean() -> Bool? { - if case let .boolean(bool) = self { - return bool - } - - return nil - } - - public func asString() -> String? { - if case let .string(string) = self { - return string - } - - return nil - } - - public func asInteger() -> Int64? { - if case let .integer(int64) = self { - return int64 - } - - return nil - } - - public func asDouble() -> Double? { - if case let .double(double) = self { - return double - } - - return nil - } - - public func asDateComponents() -> DateComponents? { - if case let .date(dateComponents) = self { - return dateComponents - } - - return nil - } - - public func asDate() -> Date? { - if case let .timestamp(date) = self { - return date - } - - return nil - } - - public func asList() -> [ConfidenceValueInternal]? { - if case let .list(values) = self { - return values - } - - return nil - } - - public func asStructure() -> [String: ConfidenceValueInternal]? { - if case let .structure(values) = self { - return values - } - - return nil - } - - public func isNull() -> Bool { - if case .null = self { - return true - } - - return false - } } extension ConfidenceValueInternal: CustomStringConvertible {