Skip to content
Snippets Groups Projects

Fact improvements & helpers

Merged Dariusz Rybicki requested to merge feature/fact-helpers into development
1 file
+ 4
2
Compare changes
  • Side-by-side
  • Inline
import Foundation
public enum FactType: Equatable {
public static let knownTypes: [FactType] = [.username, .email, .phone]
case username
case email
case phone
case other(Int)
}
public static let knownTypes: [FactType] = [.username, .email, .phone]
extension FactType: RawRepresentable {
public init(rawValue: Int) {
if let known = FactType.knownTypes.first(where: { $0.rawValue == rawValue }) {
self = known
Loading