mirror of
https://github.com/ichmagmaus111/ghostgram.git
synced 2026-11-19 13:14:09 +01:00
Ghostgram for iOS, rebuilt from scratch on Telegram iOS 13.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24 lines
467 B
Swift
24 lines
467 B
Swift
import Foundation
|
|
|
|
public struct SimpleSet<T: Equatable> {
|
|
private var items: [T] = []
|
|
|
|
public init() {
|
|
}
|
|
|
|
public mutating func insert(_ item: T) {
|
|
if !self.contains(item) {
|
|
self.items.append(item)
|
|
}
|
|
}
|
|
|
|
public func contains(_ item: T) -> Bool {
|
|
for currentItem in self.items {
|
|
if currentItem == item {
|
|
return true
|
|
}
|
|
}
|
|
return false
|
|
}
|
|
}
|