Closed paolobarbolini closed 2 years ago
Replaces Serializer::serialize_str with Serializer::collect_str, which serializes the output of the Display implementation without going through the extra allocation, if the Serializer supports it. For example the serde_json::Serializer supports it
Serializer::serialize_str
Serializer::collect_str
Display
Serializer
serde_json::Serializer
Thanks @paolobarbolini 👍
Replaces
Serializer::serialize_str
withSerializer::collect_str
, which serializes the output of theDisplay
implementation without going through the extra allocation, if theSerializer
supports it. For example theserde_json::Serializer
supports it