diff options
author | Richard Walters <rwalters@digitalstirling.com> | 2020-10-15 12:53:28 -0700 |
---|---|---|
committer | Richard Walters <rwalters@digitalstirling.com> | 2020-10-15 12:53:28 -0700 |
commit | df19e6b005c6a08e2b068ec0468c50db31387002 (patch) | |
tree | c0dac4b84fd04b0b48e793ee211c674fc85fcef5 /src/context.rs | |
parent | 170b711d710a0572fbd396c29be6647a5dcf3836 (diff) |
Refactoring for encode_element; thanks to @Serayen for suggesting them
* We can write! directly into a String (as lone as we use std::fmt::Write).
* We can pre-allocate the encoded String with an estimate of the number
of bytes we need. If we need more, String will allocate more, and only
in doubles (not every `push` or `write!`).
Diffstat (limited to 'src/context.rs')
0 files changed, 0 insertions, 0 deletions