Skip to content

Commit

Permalink
Remove unused converters
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziodemaria committed Apr 5, 2024
1 parent 839fd8c commit 4fc0e97
Showing 1 changed file with 0 additions and 72 deletions.
72 changes: 0 additions & 72 deletions Sources/Confidence/ConfidenceValue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4fc0e97

Please sign in to comment.