Remove old custom Identifiable type

This commit is contained in:
Shadowfacts 2019-09-05 14:33:10 -04:00
parent 1bc598691f
commit d3848b356b
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
3 changed files with 5 additions and 9 deletions

View File

@ -38,3 +38,5 @@ extension Notification {
case follow case follow
} }
} }
extension Notification: Identifiable {}

View File

@ -129,3 +129,5 @@ extension Status {
case direct case direct
} }
} }
extension Status: Identifiable {}

View File

@ -8,7 +8,7 @@
import Foundation import Foundation
public struct TimelineSegment<Type: Identifiable> { public struct TimelineSegment<Type: Identifiable> where Type.ID == String {
private var ids: [String] private var ids: [String]
public init(objects: [Type]) { public init(objects: [Type]) {
@ -47,11 +47,3 @@ extension TimelineSegment: RandomAccessCollection {
return ids.endIndex 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 {}