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 {
423423 private static var associationKey : UnsafeRawPointer {
424424 // We never dereference this, we only use this address as a unique key
425425 unsafe unsafeBitCast(
426- ObjectIdentifier ( _StringGuts . self) ,
426+ ObjectIdentifier ( __StringStorage . self) ,
427427 to: UnsafeRawPointer . self
428428 )
429429 }
@@ -437,7 +437,6 @@ extension _StringGuts {
437437 ) - > UnsafeRawPointer? ) . self
438438 )
439439 _precondition ( _object. hasObjCBridgeableObject)
440- // print("has ObjC Bridgeable Object")
441440 if let assocPtr = unsafe getter(
442441 _object. objCBridgeableObject,
443442 Self . associationKey
@@ -484,7 +483,7 @@ extension _StringGuts {
484483 } else {
485484 var contents = String . UnicodeScalarView ( )
486485 // 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 ) )
488487 for c in String . UnicodeScalarView ( self ) {
489488 contents. append ( c)
490489 }
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ let strings = [
2828 " A long ASCII string exceeding 16 code units. " ,
2929 " 🇯🇵 " ,
3030 " 🏂☃❅❆❄︎⛄️❄️ " ,
31+ " " ,
3132]
3233
3334strings. forEach { expected in
You can’t perform that action at this time.
0 commit comments