diff --git a/Pachyderm/Model/Notification.swift b/Pachyderm/Model/Notification.swift index 5a2b09b6..6bcd99e2 100644 --- a/Pachyderm/Model/Notification.swift +++ b/Pachyderm/Model/Notification.swift @@ -38,3 +38,5 @@ extension Notification { case follow } } + +extension Notification: Identifiable {} diff --git a/Pachyderm/Model/Status.swift b/Pachyderm/Model/Status.swift index 0cbc248b..6f2b7587 100644 --- a/Pachyderm/Model/Status.swift +++ b/Pachyderm/Model/Status.swift @@ -129,3 +129,5 @@ extension Status { case direct } } + +extension Status: Identifiable {} diff --git a/Pachyderm/TimelineSegment.swift b/Pachyderm/TimelineSegment.swift index 9cbc47b6..ff7d699c 100644 --- a/Pachyderm/TimelineSegment.swift +++ b/Pachyderm/TimelineSegment.swift @@ -8,7 +8,7 @@ import Foundation -public struct TimelineSegment { +public struct TimelineSegment where Type.ID == String { private var ids: [String] public init(objects: [Type]) { @@ -47,11 +47,3 @@ extension TimelineSegment: RandomAccessCollection { return ids.endIndex } } - -// todo: remove me when i update to beta 5, Identifiable is now part of Swift stdlib -public protocol Identifiable { - var id: String { get } -} - -extension Status: Identifiable {} -extension Notification: Identifiable {}