And there is also ArrayString[0] from the arrayvec crate[1]. I was considering reusing this and getting rid of the fixed size `InlineString` I rolled myself as ArrayString is almost identical.
[0] http://bluss.github.io/arrayvec/doc/arrayvec/struct.ArrayString.html [1] https://crates.io/crates/arrayvec On Tue, Dec 1, 2015 at 6:03 PM, Simon Sapin <simon.sa...@exyr.org> wrote: > On 02/12/15 02:39, Nick Fitzgerald wrote: > >> I've created a crate[0] that provides a mostly drop-in replacement of >> std::string::String but with inline storage for small strings to avoid >> heap >> allocation. >> >> [0]https://github.com/fitzgen/inlinable_string >> > > There’s also [1], already in used in Servo in some places, which behaves > like Vec<T> but stores items inline up to a certain length. I’ve also been > playing with [2] to be like String but with a generic backing storage. > (I’ve used it in [3] to return a single code point in UTF-8 as > StringWrapper<[u8; 4]>.) > > Would it make sense to converge with some of these? > > [1] https://github.com/servo/rust-smallvec > [2] > https://github.com/SimonSapin/rust-std-candidates/blob/master/string-wrapper/lib.rs > [3] https://github.com/SimonSapin/rust-utf8 > > > -- > Simon Sapin > > _______________________________________________ > dev-servo mailing list > dev-servo@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-servo > _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo