mirror of
https://github.com/apple/swift-collections
synced 2026-11-26 04:47:48 +00:00
[BasicContainers] Add early drafts for RigidSet/RigidDictionary
This commit is contained in:
36 files changed
+2411
-51
No files matched your search
@@ -79,7 +79,7 @@ extension BitArray._UnsafeHandle {
|
||||
words[start.word].formUnion(bits.shiftedUp(by: start.bit))
|
||||
words[end.word].formIntersection(_Word(upTo: end.bit).complement())
|
||||
words[end.word].formUnion(
|
||||
bits.shiftedDown(by: UInt(_Word.capacity) &- start.bit))
|
||||
bits.shiftedDown(by: _Word._capacity &- start.bit))
|
||||
}
|
||||
|
||||
internal mutating func copy(
|
||||
@@ -160,7 +160,7 @@ extension BitArray._UnsafeHandle {
|
||||
var it = source.makeIterator()
|
||||
if pos.bit > 0 {
|
||||
let (bits, count) = it._nextChunk(
|
||||
maximumCount: UInt(_Word.capacity) - pos.bit)
|
||||
maximumCount: _Word._capacity - pos.bit)
|
||||
_copy(bits: bits, count: count, to: pos)
|
||||
pos.value += count
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user