File tree Expand file tree Collapse file tree 4 files changed +10
-3
lines changed
Expand file tree Collapse file tree 4 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -418,6 +418,13 @@ extension _StringGuts {
418418 }
419419}
420420
421+ extension _StringGuts {
422+ @inline ( __always) // Performance
423+ internal func isTriviallyIdentical( to other: Self ) -> Bool {
424+ self . rawBits == other. rawBits
425+ }
426+ }
427+
421428#if _runtime(_ObjC)
422429extension _StringGuts {
423430
Original file line number Diff line number Diff line change @@ -1064,6 +1064,6 @@ extension String.UTF16View {
10641064 /// - Complexity: O(1)
10651065 @available ( SwiftStdlib 6 . 3 , * )
10661066 public func isTriviallyIdentical( to other: Self ) -> Bool {
1067- self . _guts. rawBits == other. _guts. rawBits
1067+ self . _guts. isTriviallyIdentical ( to : other. _guts)
10681068 }
10691069}
Original file line number Diff line number Diff line change @@ -692,6 +692,6 @@ extension String.UTF8View {
692692 /// - Complexity: O(1)
693693 @available ( SwiftStdlib 6 . 3 , * )
694694 public func isTriviallyIdentical( to other: Self ) -> Bool {
695- self . _guts. rawBits == other. _guts. rawBits
695+ self . _guts. isTriviallyIdentical ( to : other. _guts)
696696 }
697697}
Original file line number Diff line number Diff line change @@ -535,6 +535,6 @@ extension String.UnicodeScalarView {
535535 /// - Complexity: O(1)
536536 @available ( SwiftStdlib 6 . 3 , * )
537537 public func isTriviallyIdentical( to other: Self ) -> Bool {
538- self . _guts. rawBits == other. _guts. rawBits
538+ self . _guts. isTriviallyIdentical ( to : other. _guts)
539539 }
540540}
You can’t perform that action at this time.
0 commit comments