mirror of
https://github.com/apple/swift-collections
synced 2026-11-29 05:14:20 +00:00
Merge pull request #782 from aashish254/fix-774-rigidset-insert-hang
[BasicContainers] Fix RigidSet/UniqueSet batch insertion never terminating without the preview trait
This commit is contained in:
2 files changed
+44
No files matched your search
@@ -155,6 +155,11 @@ extension RigidSet where Element: ~Copyable {
|
||||
}
|
||||
#else
|
||||
output.withUnsafeMutableBufferPointer { buffer, count in
|
||||
if count < c {
|
||||
remainder = 0
|
||||
} else {
|
||||
remainder &-= count
|
||||
}
|
||||
for i in 0 ..< count {
|
||||
self.insert(buffer.moveElement(from: i))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user