From d3848b356bc8dac862c4d6e3273550ff31ef82a5 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Thu, 5 Sep 2019 14:33:10 -0400 Subject: [PATCH] Remove old custom Identifiable type --- Pachyderm/Model/Notification.swift | 2 ++ Pachyderm/Model/Status.swift | 2 ++ Pachyderm/TimelineSegment.swift | 10 +--------- 3 files changed, 5 insertions(+), 9 deletions(-) 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 {}