Use Swift 5.7 if-let style

This commit is contained in:
Arkadiusz Fal
2022-09-28 16:27:01 +02:00
parent 8f96a7c5e0
commit a086a0f440
50 changed files with 114 additions and 114 deletions

View File

@@ -55,7 +55,7 @@ struct URLParser {
}
var isYoutubeHost: Bool {
guard let urlComponents = urlComponents else { return false }
guard let urlComponents else { return false }
return urlComponents.host == "youtube.com" || urlComponents.host == "www.youtube.com"
}
@@ -132,7 +132,7 @@ struct URLParser {
}
private var pathWithoutForwardSlash: String {
guard let urlComponents = urlComponents else { return "" }
guard let urlComponents else { return "" }
return String(urlComponents.path.dropFirst())
}