Make code formatting match current style.
This commit is contained in:
parent
cc458ecab7
commit
1a03bcf03c
|
@ -1,6 +1,6 @@
|
|||
//
|
||||
// DatabaseObject+Database.swift
|
||||
// Database
|
||||
// NetNewsWire
|
||||
//
|
||||
// Created by Brent Simmons on 9/13/17.
|
||||
// Copyright © 2017 Ranchero Software. All rights reserved.
|
||||
|
@ -13,13 +13,11 @@ import Articles
|
|||
extension Array where Element == DatabaseObject {
|
||||
|
||||
func asAuthors() -> Set<Author>? {
|
||||
|
||||
let authors = Set(self.map { $0 as! Author })
|
||||
return authors.isEmpty ? nil : authors
|
||||
}
|
||||
|
||||
func asAttachments() -> Set<Attachment>? {
|
||||
|
||||
let attachments = Set(self.map { $0 as! Attachment })
|
||||
return attachments.isEmpty ? nil : attachments
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ import Articles
|
|||
extension RelatedObjectsMap {
|
||||
|
||||
func attachments(for articleID: String) -> Set<Attachment>? {
|
||||
|
||||
if let objects = self[articleID] {
|
||||
return objects.asAttachments()
|
||||
}
|
||||
|
@ -21,7 +20,6 @@ extension RelatedObjectsMap {
|
|||
}
|
||||
|
||||
func authors(for articleID: String) -> Set<Author>? {
|
||||
|
||||
if let objects = self[articleID] {
|
||||
return objects.asAuthors()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue