[BasicContainers] Add early drafts for RigidSet/RigidDictionary

This commit is contained in:
Karoy Lorentey committed 2026-02-16 17:15:59 -08:00
1 parent 934ad786d2
commit bf9a7033a0
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
}