File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -423,7 +423,7 @@ extension _StringGuts {
423
423
private static var associationKey : UnsafeRawPointer {
424
424
// We never dereference this, we only use this address as a unique key
425
425
unsafe unsafeBitCast(
426
- ObjectIdentifier ( _StringGuts . self) ,
426
+ ObjectIdentifier ( __StringStorage . self) ,
427
427
to: UnsafeRawPointer . self
428
428
)
429
429
}
@@ -437,7 +437,6 @@ extension _StringGuts {
437
437
) - > UnsafeRawPointer? ) . self
438
438
)
439
439
_precondition ( _object. hasObjCBridgeableObject)
440
- // print("has ObjC Bridgeable Object")
441
440
if let assocPtr = unsafe getter(
442
441
_object. objCBridgeableObject,
443
442
Self . associationKey
@@ -484,7 +483,7 @@ extension _StringGuts {
484
483
} else {
485
484
var contents = String . UnicodeScalarView ( )
486
485
// always reserve a size larger than a small string
487
- contents. reserveCapacity ( Swift . max ( 31 , 1 + count + count >> 1 ) )
486
+ contents. reserveCapacity ( Swift . max ( _SmallString . capacity + 1 , 1 + count + count >> 1 ) )
488
487
for c in String . UnicodeScalarView ( self ) {
489
488
contents. append ( c)
490
489
}
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ let strings = [
28
28
" A long ASCII string exceeding 16 code units. " ,
29
29
" 🇯🇵 " ,
30
30
" 🏂☃❅❆❄︎⛄️❄️ " ,
31
+ " " ,
31
32
]
32
33
33
34
strings. forEach { expected in
You can’t perform that action at this time.
0 commit comments