mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Conform URL to ExpressibleByStringLiteral (#1214)
This commit is contained in:
@@ -16,12 +16,12 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
extension URL {
|
||||
init(staticString: StaticString) {
|
||||
guard let url = URL(string: "\(staticString)") else {
|
||||
extension URL: ExpressibleByStringLiteral {
|
||||
public init(stringLiteral value: StaticString) {
|
||||
guard let url = URL(string: "\(value)") else {
|
||||
fatalError("The static string used to create this URL is invalid")
|
||||
}
|
||||
|
||||
|
||||
self = url
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user