Skip to content

Instantly share code, notes, and snippets.

@Koze
Created October 12, 2019 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Koze/38ded67adef6a706b05bbaeed3c1c9ff to your computer and use it in GitHub Desktop.
Save Koze/38ded67adef6a706b05bbaeed3c1c9ff to your computer and use it in GitHub Desktop.
import Foundation
extension RawRepresentable {
init?(rawValue: Self.RawValue?) {
guard let rawValue = rawValue else {
return nil
}
self.init(rawValue: rawValue)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment