stdlib: Address StrictMemorySafety warnings in String related code.

This commit is contained in:
Allan Shortlidge
2025-03-31 14:43:55 -07:00
parent b3038e6d81
commit 60e66f3613
6 changed files with 7 additions and 7 deletions

View File

@@ -278,7 +278,7 @@ extension String {
@_effects(readonly) @_semantics("string.getUTF8CString")
get {
if _fastPath(_guts.isFastUTF8) {
var result = unsafe _guts.withFastCChar { ContiguousArray($0) }
var result = unsafe _guts.withFastCChar { unsafe ContiguousArray($0) }
result.append(0)
return result
}