aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorRichard Walters <rwalters@digitalstirling.com>2020-10-15 12:53:28 -0700
committerRichard Walters <rwalters@digitalstirling.com>2020-10-15 12:53:28 -0700
commitdf19e6b005c6a08e2b068ec0468c50db31387002 (patch)
treec0dac4b84fd04b0b48e793ee211c674fc85fcef5 /src/lib.rs
parent170b711d710a0572fbd396c29be6647a5dcf3836 (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/lib.rs')
0 files changed, 0 insertions, 0 deletions