Closed
Description
A String
is usually preferred to a Box<str>
. However, there is one good reason to prefer the Boxed variant to the growable String, which is that String requires more memory. See https://users.rust-lang.org/t/use-case-for-box-str-and-string/8295/4
Similarly, Box<AsciiStr>
uses less memory than AsciiString
, so it would be helpful if there were ways to convert a AsciiString
to a Box<AsciiStr>
, just as it is possible to do so for String
and Box<str>
.
On my machine, Box<AsciiStr>
uses 16 bytes compared to 24 bytes for AsciiString
.
Metadata
Metadata
Assignees
Labels
No labels