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

use from_utf8_unchecked in the fmt::Display implementation of Value #751

Merged
merged 1 commit into from Feb 5, 2021

Commits on Feb 5, 2021

  1. use from_utf8_unchecked in the fmt::Display implementation of Value

    `WriterFormatter` has been moved into it's own little module to enforce using it's `new` method to convey the unsafe requirements.
    the safety requirements that the serializer only emits valid utf8 is already assumed by the existing `to_string` methods.
    
    this speeds up formatting large `Value`s by about 33% in my testing
    icewind1991 committed Feb 5, 2021
    Copy the full SHA
    e0747b9 View commit details
    Browse the repository at this point in the history