Skip to content

[stdlib] String.UTF8View.index(_:offsetBy:limitedBy:): mark encoding of result #62859

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

lorentey
Copy link
Member

@lorentey lorentey commented Jan 5, 2023

This marks the expected storage encoding of the index returned on the fast path of the UTF-8 view's index(_:offsetBy:limitedBy:) method, ensuring index misuse can be detected on subsequent uses, and improving the display of the index during debugging.

This was one path I missed during last year's String fixes.

@lorentey
Copy link
Member Author

lorentey commented Jan 5, 2023

@swift-ci test

@lorentey lorentey merged commit 0bdc84b into swiftlang:main Jan 5, 2023
@lorentey lorentey deleted the mark-utf8-index-encoding branch January 5, 2023 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant