mirror of
https://github.com/apple/swift-collections
synced 2026-11-22 04:20:40 +00:00
Merge pull request #832 from lorentey/strict-memory-safety
Resolve strict memory safety warnings with UnstableHashedContainers trait
This commit is contained in:
1 file changed
+2
-2
@@ -154,14 +154,14 @@ extension RigidSet where Element: ~Copyable {
|
||||
}
|
||||
}
|
||||
#else
|
||||
output.withUnsafeMutableBufferPointer { buffer, count in
|
||||
unsafe output.withUnsafeMutableBufferPointer { buffer, count in
|
||||
if count < c {
|
||||
remainder = 0
|
||||
} else {
|
||||
remainder &-= count
|
||||
}
|
||||
for i in 0 ..< count {
|
||||
self.insert(buffer.moveElement(from: i))
|
||||
unsafe self.insert(buffer.moveElement(from: i))
|
||||
}
|
||||
count = 0
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user