Skip to content

Instantly share code, notes, and snippets.

@vasilevkin
Last active November 22, 2018 13:18
Show Gist options
  • Save vasilevkin/d91fc7456b9d2b41dd8870a24122788b to your computer and use it in GitHub Desktop.
Save vasilevkin/d91fc7456b9d2b41dd8870a24122788b to your computer and use it in GitHub Desktop.
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