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 4d23610 commit de340a7Copy full SHA for de340a7
stdlib/public/core/StringUTF8View.swift
@@ -337,13 +337,7 @@ extension String.UTF8View {
337
#if _runtime(_ObjC)
338
// handle non-UTF8 Objective-C bridging cases here
339
if !_guts.isFastUTF8 && _guts._object.hasObjCBridgeableObject {
340
- let storage: __StringStorage
341
- if let associated = _guts.getAssociatedStorage() {
342
- storage = associated
343
- }
344
- else {
345
- storage = _guts.getOrAllocateAssociatedStorage()
346
+ let storage = _guts.getOrAllocateAssociatedStorage()
347
let (start, count) = unsafe (storage.start, storage.count)
348
let span = unsafe Span(_unsafeStart: start, count: count)
349
return unsafe _overrideLifetime(span, borrowing: self)
0 commit comments