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 159c946 commit 6787b73Copy full SHA for 6787b73
stdlib/public/core/StringCreate.swift
@@ -120,6 +120,7 @@ extension String {
120
)
121
return result.asString
122
case .error(let initialRange):
123
+ defer { _fixLifetime(result) }
124
//This could be optimized to use excess tail capacity
125
return repairUTF8(result.codeUnits, firstKnownBrokenRange: initialRange)
126
}
0 commit comments