Skip to content

Implement io.StringWriter on some more types#2023

Merged
erikdubbelboer merged 1 commit intomasterfrom
StringWriter
Jun 19, 2025
Merged

Implement io.StringWriter on some more types#2023
erikdubbelboer merged 1 commit intomasterfrom
StringWriter

Conversation

@erikdubbelboer
Copy link
Collaborator

In theory this can optimize some code paths where a string first needs to be converted to a []byte to use the normal Write method. By implementing WriteString this extra copy isn't needed. Internally we don't do the copy and just use s2b instead.

In theory this can optimize some code paths where a string first needs
to be converted to a []byte to use the normal Write method. By
implementing WriteString this extra copy isn't needed. Internall we
don't do the copy and just use s2b instead.
@erikdubbelboer erikdubbelboer merged commit d356cac into master Jun 19, 2025
11 checks passed
@erikdubbelboer erikdubbelboer deleted the StringWriter branch September 5, 2025 10:56
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