We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce17877 commit 52f9c77Copy full SHA for 52f9c77
stdlib/public/core/StringCreate.swift
@@ -124,6 +124,7 @@ extension String {
124
// we use it directly. This could be a little faster, but this error path
125
// shouldn't be perf-sensitive anyway.
126
let temporaryCodeUnits = Array(result.codeUnits)
127
+ defer { _fixLifetime(temporaryCodeUnits) }
128
return temporaryCodeUnits.withContiguousStorageIfAvailable {
129
//This could be optimized to use excess tail capacity
130
return repairUTF8($0, firstKnownBrokenRange: initialRange)
0 commit comments