-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Use u8
literals in ManagedTextSection
.
#86657
Conversation
Tagging subscribers to this area: @dotnet/area-system-reflection-metadata Issue DetailsInstead of iterating the characters of a string, casting them into bytes and writing them, we use
|
@@ -788,7 +788,7 @@ public void WriteBytes(byte[] buffer, int start, int byteCount) | |||
WriteBytes(buffer.AsSpan(start, byteCount)); | |||
} | |||
|
|||
private void WriteBytes(ReadOnlySpan<byte> buffer) | |||
internal void WriteBytes(ReadOnlySpan<byte> buffer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move below public methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to not move it to minimize changes. It will become public with #85280 either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
The failures unrelated and known |
Instead of iterating the characters of a string, casting them into bytes and writing them, we use
u8
literals and directly write the UTF-8 span of them.