Make code formatting match current style.

This commit is contained in:
Brent Simmons 2019-07-08 22:22:31 -07:00
parent cc458ecab7
commit 1a03bcf03c
2 changed files with 1 additions and 5 deletions

View File

@ -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
}

View File

@ -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()
}