Sources: Add unsafe keywords where needed

This commit is contained in:
Karoy Lorentey committed 2026-10-01 11:14:29 -07:00
1 parent 13f71ad927
commit d07dc32dfa
301 files changed
+6051 -5498

No files matched your search

@@ -66,14 +66,14 @@ extension BitArray {
var result: String
if #available(macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0, *) {
result = String(unsafeUninitializedCapacity: self.count + 2) { target in
target.initializeElement(at: count + 1, to: ._asciiGT)
unsafe target.initializeElement(at: count + 1, to: ._asciiGT)
var i = count
for v in self {
target.initializeElement(at: i, to: v ? ._ascii1 : ._ascii0)
unsafe target.initializeElement(at: i, to: v ? ._ascii1 : ._ascii0)
i &-= 1
}
assert(i == 0)
target.initializeElement(at: 0, to: ._asciiLT)
unsafe target.initializeElement(at: 0, to: ._asciiLT)
return count + 2
}
} else {