Skip to content

Instantly share code, notes, and snippets.

@S2Ler
Created September 5, 2017 10:09
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 S2Ler/1f051afe6c4f538f94011bfa52a9bf98 to your computer and use it in GitHub Desktop.
Save S2Ler/1f051afe6c4f538f94011bfa52a9bf98 to your computer and use it in GitHub Desktop.
Swift Crash
import Foundation
extension URLComponents {
public mutating func whyThisFails() {
guard let currentComponentString = components.string,
let components = URLComponents(string: currentComponentString) else { return }
self = components
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment