Skip to content
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

push_to_string #1010

Closed
wants to merge 1 commit into from
Closed

Conversation

stepancheg
Copy link
Contributor

Safe API to use when serde-json is used to serialze values semi-automatically, i.e. half of JSON is written by appending strings to String, and and half of serialization is done with serde-json.

Safe API to use when serde-json is used to serialze values
semi-automatically, i.e. half of JSON is written by appending strings to
`String`, and and half of serialization is done with `serde-json`.
Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the intersection of circumstances where someone is appending JSON to an existing string, to_string + push_str is too slow, to_writer + from_utf8 is too slow, and to_writer + from_utf8_unchecked is too unsafe, is too small to make sense adding a function dedicated to this.

@dtolnay dtolnay closed this Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants