@@ -2080,10 +2080,6 @@ final internal class _HashableTypedNativeDictionaryStorage<Key: Hashable, Value>
2080
2080
return _NativeDictionary ( _storage: self )
2081
2081
}
2082
2082
2083
- internal var full : Dictionary < Key , Value > {
2084
- return Dictionary ( _native: native)
2085
- }
2086
-
2087
2083
@objc
2088
2084
internal override func enumerator( ) -> _NSEnumerator {
2089
2085
return _SwiftDictionaryNSEnumerator < Key , Value > (
@@ -2169,15 +2165,15 @@ final internal class _HashableTypedNativeDictionaryStorage<Key: Hashable, Value>
2169
2165
if let unmanagedKeys = _UnmanagedAnyObjectArray ( keys) {
2170
2166
if let unmanagedObjects = _UnmanagedAnyObjectArray ( objects) {
2171
2167
// keys nonnull, objects nonnull
2172
- for (key, value) in full {
2168
+ for (key, value) in native {
2173
2169
unmanagedObjects [ i] = _bridgeAnythingToObjectiveC ( value)
2174
2170
unmanagedKeys [ i] = _bridgeAnythingToObjectiveC ( key)
2175
2171
i += 1
2176
2172
guard i < count else { break }
2177
2173
}
2178
2174
} else {
2179
2175
// keys nonnull, objects null
2180
- for (key, _) in full {
2176
+ for (key, _) in native {
2181
2177
unmanagedKeys [ i] = _bridgeAnythingToObjectiveC ( key)
2182
2178
i += 1
2183
2179
guard i < count else { break }
@@ -2186,7 +2182,7 @@ final internal class _HashableTypedNativeDictionaryStorage<Key: Hashable, Value>
2186
2182
} else {
2187
2183
if let unmanagedObjects = _UnmanagedAnyObjectArray ( objects) {
2188
2184
// keys null, objects nonnull
2189
- for (_, value) in full {
2185
+ for (_, value) in native {
2190
2186
unmanagedObjects [ i] = _bridgeAnythingToObjectiveC ( value)
2191
2187
i += 1
2192
2188
guard i < count else { break }
@@ -2589,8 +2585,9 @@ extension _NativeDictionary where Key: Hashable {
2589
2585
maxLoadFactorInverse: Double
2590
2586
) -> Int {
2591
2587
// `capacity + 1` below ensures that we don't fill in the last hole
2592
- return max ( Int ( ( Double ( capacity) * maxLoadFactorInverse) . rounded ( . up) ) ,
2593
- capacity + 1 )
2588
+ return Swift . max (
2589
+ Int ( ( Double ( capacity) * maxLoadFactorInverse) . rounded ( . up) ) ,
2590
+ capacity + 1 )
2594
2591
}
2595
2592
2596
2593
/// Self should be uniquely referenced.
@@ -4224,7 +4221,7 @@ extension Dictionary.Index: Hashable {
4224
4221
}
4225
4222
}
4226
4223
4227
- extension _NativeDictionary {
4224
+ extension _NativeDictionary : Sequence {
4228
4225
@usableFromInline
4229
4226
@_fixed_layout
4230
4227
internal struct Iterator {
@@ -4269,7 +4266,7 @@ extension _NativeDictionary.Iterator: IteratorProtocol {
4269
4266
}
4270
4267
4271
4268
#if _runtime(_ObjC)
4272
- extension _CocoaDictionary {
4269
+ extension _CocoaDictionary : Sequence {
4273
4270
@usableFromInline
4274
4271
final internal class Iterator {
4275
4272
// Cocoa Dictionary iterator has to be a class, otherwise we cannot
0 commit comments