mirror of
https://github.com/yattee/yattee.git
synced 2025-08-09 20:24:06 +00:00
Use Swift 5.7 if-let style
This commit is contained in:
@@ -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())
|
||||
}
|
||||
|
Reference in New Issue
Block a user