Quiet warnings/errors from Xcode 10.2 about redundant public attributes on methods implemented inside public extensions.

This commit is contained in:
Daniel Jalkut 2019-02-12 10:04:18 -05:00
parent 7566490e56
commit ddb0ee21b6
5 changed files with 17 additions and 17 deletions

View File

@ -16,12 +16,12 @@ import RSDatabase
public extension Notification.Name {
public static let AccountRefreshDidBegin = Notification.Name(rawValue: "AccountRefreshDidBegin")
public static let AccountRefreshDidFinish = Notification.Name(rawValue: "AccountRefreshDidFinish")
public static let AccountRefreshProgressDidChange = Notification.Name(rawValue: "AccountRefreshProgressDidChange")
public static let AccountDidDownloadArticles = Notification.Name(rawValue: "AccountDidDownloadArticles")
static let AccountRefreshDidBegin = Notification.Name(rawValue: "AccountRefreshDidBegin")
static let AccountRefreshDidFinish = Notification.Name(rawValue: "AccountRefreshDidFinish")
static let AccountRefreshProgressDidChange = Notification.Name(rawValue: "AccountRefreshProgressDidChange")
static let AccountDidDownloadArticles = Notification.Name(rawValue: "AccountDidDownloadArticles")
public static let StatusesDidChange = Notification.Name(rawValue: "StatusesDidChange")
static let StatusesDidChange = Notification.Name(rawValue: "StatusesDidChange")
}
public enum AccountType: Int {

View File

@ -12,12 +12,12 @@ import RSParser
public extension Notification.Name {
public static let FeedSettingDidChange = Notification.Name(rawValue: "FeedSettingDidChangeNotification")
static let FeedSettingDidChange = Notification.Name(rawValue: "FeedSettingDidChangeNotification")
}
public extension Feed {
public func takeSettings(from parsedFeed: ParsedFeed) {
func takeSettings(from parsedFeed: ParsedFeed) {
var didChangeAtLeastOneSetting = false
@ -52,11 +52,11 @@ public extension Feed {
public extension Article {
public var account: Account? {
var account: Account? {
return AccountManager.shared.existingAccount(with: accountID)
}
public var feed: Feed? {
var feed: Feed? {
return account?.existingFeed(with: feedID)
}
}

View File

@ -10,7 +10,7 @@ import Foundation
public extension Notification.Name {
public static let UnreadCountDidChange = Notification.Name(rawValue: "UnreadCountDidChange")
static let UnreadCountDidChange = Notification.Name(rawValue: "UnreadCountDidChange")
}
public protocol UnreadCountProvider {
@ -24,12 +24,12 @@ public protocol UnreadCountProvider {
public extension UnreadCountProvider {
public func postUnreadCountDidChangeNotification() {
func postUnreadCountDidChangeNotification() {
NotificationCenter.default.post(name: .UnreadCountDidChange, object: self, userInfo: nil)
}
public func calculateUnreadCount<T: Collection>(_ children: T) -> Int {
func calculateUnreadCount<T: Collection>(_ children: T) -> Int {
let updatedUnreadCount = children.reduce(0) { (result, oneChild) -> Int in
if let oneUnreadCountProvider = oneChild as? UnreadCountProvider {

View File

@ -68,11 +68,11 @@ public struct Article: Hashable {
public extension Set where Element == Article {
public func articleIDs() -> Set<String> {
func articleIDs() -> Set<String> {
return Set<String>(map { $0.articleID })
}
public func unreadArticles() -> Set<Article> {
func unreadArticles() -> Set<Article> {
let articles = self.filter { !$0.status.read }
return Set(articles)
}
@ -80,7 +80,7 @@ public extension Set where Element == Article {
public extension Array where Element == Article {
public func articleIDs() -> [String] {
func articleIDs() -> [String] {
return map { $0.articleID }
}
}

View File

@ -83,7 +83,7 @@ public final class ArticleStatus: Hashable {
public extension Set where Element == ArticleStatus {
public func articleIDs() -> Set<String> {
func articleIDs() -> Set<String> {
return Set<String>(map { $0.articleID })
}
@ -91,7 +91,7 @@ public extension Set where Element == ArticleStatus {
public extension Array where Element == ArticleStatus {
public func articleIDs() -> [String] {
func articleIDs() -> [String] {
return map { $0.articleID }
}