Remove old custom Identifiable type
This commit is contained in:
parent
1bc598691f
commit
d3848b356b
|
@ -38,3 +38,5 @@ extension Notification {
|
||||||
case follow
|
case follow
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension Notification: Identifiable {}
|
||||||
|
|
|
@ -129,3 +129,5 @@ extension Status {
|
||||||
case direct
|
case direct
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension Status: Identifiable {}
|
||||||
|
|
|
@ -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 {}
|
|
||||||
|
|
Loading…
Reference in New Issue