Skip to content

Commit 59e4976

Browse files
committed
Update LegacyABI.swift
1 parent 8dc064d commit 59e4976

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

stdlib/public/core/LegacyABI.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,15 +177,15 @@ extension _NativeDictionary {
177177
internal func __abi_mapValues<T>(
178178
_ transform: (Value) throws -> T
179179
) rethrows -> _NativeDictionary<Key, T> {
180-
let resultStorage = _DictionaryStorage<Key, T>.copy(original: _storage)
181-
_internalInvariant(resultStorage._seed == _storage._seed)
182-
let result = _NativeDictionary<Key, T>(resultStorage)
180+
let resultStorage = unsafe _DictionaryStorage<Key, T>.copy(original: _storage)
181+
unsafe _internalInvariant(resultStorage._seed == _storage._seed)
182+
let result = unsafe _NativeDictionary<Key, T>(resultStorage)
183183
// Because the current and new buffer have the same scale and seed, we can
184184
// initialize to the same locations in the new buffer, skipping hash value
185185
// recalculations.
186-
for bucket in hashTable {
187-
let key = self.uncheckedKey(at: bucket)
188-
let value = self.uncheckedValue(at: bucket)
186+
for unsafe bucket in unsafe hashTable {
187+
let key = unsafe self.uncheckedKey(at: bucket)
188+
let value = unsafe self.uncheckedValue(at: bucket)
189189
try result._insert(at: bucket, key: key, value: transform(value))
190190
}
191191
return result

0 commit comments

Comments
 (0)