mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
15 lines
282 B
Swift
15 lines
282 B
Swift
import Foundation
|
|
|
|
public protocol Identifiable {
|
|
associatedtype T: Hashable
|
|
var stableId: T { get }
|
|
}
|
|
|
|
public struct AnyIdentifiable {
|
|
var stableId: AnyHashable
|
|
|
|
public init<T>(_ value: T) where T : Identifiable {
|
|
self.stableId = value.stableId
|
|
}
|
|
}
|