[BitSet, OrderedCollections] Unify UnsafeBitSet implementations

This commit is contained in:
Karoy Lorentey committed 2022-11-28 16:30:55 -08:00
1 parent c80b844e5e
commit a2f4b18ae0
29 files changed
+944 -1382

No files matched your search

+3 -1
View File
@@ -9,6 +9,8 @@
//
//===----------------------------------------------------------------------===//
import _CollectionsUtilities
/// A sorted collection of small nonnegative integers, implemented as an
/// uncompressed bitmap of as many bits as the value of the largest member.
///
@@ -65,7 +67,7 @@ extension BitSet {
}
internal mutating func _shrink() {
let suffix = _read { $0.emptySuffix() }
let suffix = _read { $0._emptySuffix() }
if suffix > 0 { _storage.removeLast(suffix) }
}