Last active
November 22, 2018 13:18
-
-
Save vasilevkin/d91fc7456b9d2b41dd8870a24122788b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static func value<T>(valueRaw: LoginResponse) -> T { | |
guard let castedValue = valueRaw as? T else { | |
fatalError("Unable to cast \(valueRaw) to \(T.self).") | |
} | |
return castedValue | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment