Revert "Remove unnecessary _fixLifetime"

This reverts commit ce17877d50.
This commit is contained in:
David Smith
2021-08-31 08:50:16 -07:00
parent ce17877d50
commit 52f9c77560

View File

@@ -124,6 +124,7 @@ extension String {
// we use it directly. This could be a little faster, but this error path
// shouldn't be perf-sensitive anyway.
let temporaryCodeUnits = Array(result.codeUnits)
defer { _fixLifetime(temporaryCodeUnits) }
return temporaryCodeUnits.withContiguousStorageIfAvailable {
//This could be optimized to use excess tail capacity
return repairUTF8($0, firstKnownBrokenRange: initialRange)