1
1
mirror of https://github.com/github/semantic.git synced 2024-11-30 06:07:23 +03:00
semantic/prototype/Doubt/Dictionary.swift

9 lines
229 B
Swift

extension Dictionary {
init<C: CollectionType where C.Generator.Element == (Key, Value)>(elements: C) {
self.init(minimumCapacity: Int(elements.count.toIntMax()))
for (key, value) in elements {
self[key] = value
}
}
}