Skip to content
Snippets Groups Projects
Commit 1c5f710c authored by Dariusz Rybicki's avatar Dariusz Rybicki
Browse files

Confirm FactType to RawRepresentable

parent 593d5f10
No related branches found
No related tags found
2 merge requests!102Release 1.0.0,!71Fact improvements & helpers
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment