mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[stdlib] String: Fix more potential UB, and rework access patterns
This commit is contained in:
@@ -123,7 +123,7 @@ extension _StringGuts {
|
||||
// Whether this string has breadcrumbs
|
||||
internal var hasBreadcrumbs: Bool {
|
||||
return hasSharedStorage
|
||||
|| (hasNativeStorage && _object.nativeStorage.hasBreadcrumbs)
|
||||
|| (hasNativeStorage && _object.withNativeStorage { $0.hasBreadcrumbs })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user