From 1c5f710c8d380aeb259de58eb17ddbd2286e86de Mon Sep 17 00:00:00 2001
From: Dariusz Rybicki <dariusz@elixxir.io>
Date: Thu, 8 Sep 2022 00:08:25 +0200
Subject: [PATCH] Confirm FactType to RawRepresentable

---
 Sources/XXClient/Models/FactType.swift | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Sources/XXClient/Models/FactType.swift b/Sources/XXClient/Models/FactType.swift
index 96caa0ff..94c28639 100644
--- a/Sources/XXClient/Models/FactType.swift
+++ b/Sources/XXClient/Models/FactType.swift
@@ -1,13 +1,15 @@
 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
-- 
GitLab