File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ extension _SmallString {
9494 }
9595
9696 @_alwaysEmitIntoClient @inline ( __always)
97- internal static var contiguousCapacity : Int {
97+ internal static func contiguousCapacity( ) -> Int {
9898#if _pointerBitWidth(_32) && os(watchOS)
9999 return capacity &- 2
100100#else
Original file line number Diff line number Diff line change @@ -409,7 +409,7 @@ extension String.UTF8View {
409409 public var _span : Span < UTF8 . CodeUnit > ? {
410410 @lifetime ( borrow self)
411411 borrowing get {
412- if _guts. isSmall, _guts. count > _SmallString. contiguousCapacity {
412+ if _guts. isSmall, _guts. count > _SmallString. contiguousCapacity ( ) {
413413 return nil
414414 }
415415 return _underlyingSpan ( )
Original file line number Diff line number Diff line change @@ -871,7 +871,8 @@ extension Substring.UTF8View {
871871 public var _span : Span < UTF8 . CodeUnit > ? {
872872 @lifetime ( borrow self)
873873 borrowing get {
874- if _wholeGuts. isSmall, _wholeGuts. count > _SmallString. contiguousCapacity {
874+ if _wholeGuts. isSmall,
875+ _wholeGuts. count > _SmallString. contiguousCapacity ( ) {
875876 // substring is spannable only when the whole string is spannable.
876877 return nil
877878 }
Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ extension String {
291291 public var _utf8Span : UTF8Span ? {
292292 @lifetime ( borrow self)
293293 borrowing get {
294- if _guts. isSmall, _guts. count > _SmallString. contiguousCapacity {
294+ if _guts. isSmall, _guts. count > _SmallString. contiguousCapacity ( ) {
295295 return nil
296296 }
297297 return unsafe UTF8 Span(
@@ -426,7 +426,8 @@ extension Substring {
426426 public var _utf8Span : UTF8Span ? {
427427 @lifetime ( borrow self)
428428 borrowing get {
429- if _wholeGuts. isSmall, _wholeGuts. count > _SmallString. contiguousCapacity {
429+ if _wholeGuts. isSmall,
430+ _wholeGuts. count > _SmallString. contiguousCapacity ( ) {
430431 // substring is spannable only when the whole string is spannable.
431432 return nil
432433 }
You can’t perform that action at this time.
0 commit comments