Skip to content

Commit 3d27453

Browse files
committed
[stdlib] adjust small string for contiguity
1 parent 23ce324 commit 3d27453

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

stdlib/public/core/SmallString.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,11 @@ internal struct _SmallString {
7979
extension _SmallString {
8080
@inlinable @inline(__always)
8181
internal static var capacity: Int {
82-
#if _pointerBitWidth(_32) || _pointerBitWidth(_16)
82+
#if _pointerBitWidth(_32) && os(watchOS)
8383
return 10
84+
#elseif _pointerBitWidth(_32) || _pointerBitWidth(_16)
85+
// Note: changed from 10 for contiguous storage.
86+
return 8
8487
#elseif os(Android) && arch(arm64)
8588
return 14
8689
#elseif _pointerBitWidth(_64)

0 commit comments

Comments
 (0)