project: replace deprecated functions

-fix warnings
-support swift4
-replace deprecated functions

Change-Id: I797d1b8078a5d8ad62a93ace3c5a32dd542a82d0
diff --git a/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewModel.swift b/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewModel.swift
index 43c7428..3963322 100644
--- a/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewModel.swift
+++ b/Ring/Ring/Features/Walkthrough/CreateAccount/CreateAccountViewModel.swift
@@ -99,7 +99,7 @@
         }
     }
 
-    static func ==(lhs: AccountCreationState, rhs: AccountCreationState) -> Bool {
+    static func == (lhs: AccountCreationState, rhs: AccountCreationState) -> Bool {
         switch (lhs, rhs) {
         case (.unknown, .unknown):
             return true
@@ -107,7 +107,7 @@
             return true
         case (.success, .success):
             return true
-        case ( .error(_), .error(_)):
+        case ( .error, .error):
             return true
         default:
             return false
@@ -196,7 +196,7 @@
                 return .validated
             }
 
-            if password.characters.count < 6 {
+            if password.count < 6 {
                 return .error(message: L10n.CreateAccount.passwordCharactersNumberError)
             }