mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Revert "Remove unnecessary _fixLifetime"
This reverts commit ce17877d50.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user