Don't unwrap now-non-optionals, and unwrap now-explicit optionals
This commit is contained in:
parent
fe6fbd31a8
commit
4ac8107f27
|
@ -29,16 +29,14 @@ class HTMLFeedFinder {
|
|||
}
|
||||
}
|
||||
|
||||
if let bodyLinks = RSHTMLLinkParser.htmlLinks(with: parserData) {
|
||||
let bodyLinks = RSHTMLLinkParser.htmlLinks(with: parserData)
|
||||
for oneBodyLink in bodyLinks {
|
||||
|
||||
if linkMightBeFeed(oneBodyLink) {
|
||||
let normalizedURL = oneBodyLink.urlString.normalizedURL
|
||||
if linkMightBeFeed(oneBodyLink), let normalizedURL = oneBodyLink.urlString?.normalizedURL {
|
||||
let oneFeedSpecifier = FeedSpecifier(title: oneBodyLink.text, urlString: normalizedURL, source: .HTMLLink)
|
||||
addFeedSpecifier(oneFeedSpecifier)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,8 +12,9 @@ import RSParser
|
|||
extension RSHTMLMetadata {
|
||||
|
||||
func largestOpenGraphImageURL() -> String? {
|
||||
let openGraphImages = openGraphProperties.images
|
||||
|
||||
guard let openGraphImages = openGraphProperties?.images, !openGraphImages.isEmpty else {
|
||||
guard !openGraphImages.isEmpty else {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -47,7 +48,9 @@ extension RSHTMLMetadata {
|
|||
|
||||
func largestAppleTouchIcon() -> String? {
|
||||
|
||||
guard let icons = appleTouchIcons, !icons.isEmpty else {
|
||||
let icons = appleTouchIcons
|
||||
|
||||
guard !icons.isEmpty else {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue