compact_str icon indicating copy to clipboard operation
compact_str copied to clipboard

A memory efficient string type that can store up to 24* bytes on the stack

Results 38 compact_str issues
Sort by recently updated
recently updated
newest added

This is a question more than a bug report, but just asking in case it reveals something more useful... * `Repr`'s 1st field is a `*const ()`. * `HeapBuffer`'s 1st...

There are a number of database crates in the Rust ecosystem, e.g. [`sqlx`](https://github.com/launchbadge/sqlx), [`diesel`](https://github.com/diesel-rs/diesel), [`postgres`](https://github.com/sfackler/rust-postgres), that all have traits related to serializing types in and out of Rows. It would...

Thank you @ParkMyCar for this library! It's really awesome but its bus factor is quite low, considering that it is used in a lot of crates, I'd suggest to add...

Switching this library to a dual license model of MIT and Apache 2.0 to follow other open source crates in the Rust ecosystem would be nice.

Recently I made the [`compact_bytes`](https://github.com/ParkMyCar/compact_bytes) repo, I would love to merge that repo into this one, and put the `compact_bytes` crate next to `compact_str`. Then there is likely some code...

e.g. `unsafe { CompactString::with_capacity(1234).as_mut_bytes() }` returns a slice of length 1234. This is questionable (even if it hasn't been declared officially UB yet) and IMO should return a `&mut [MaybeUninit]`,...

I had an idea to avoid transmuting `Repr`s around by directly making use of the enum niche optimization. Basically, store `([u8; 23], LastUtf8Char)` in `Inline`, restrict `LastUtf8Char` to only actual...

Given these are two fairly large features, I want to make sure they're called out in the README so users know about them.

After merging #287 the specialization for `String` in the `ToString` trait was disabled, pending the release of this PR https://github.com/sagebind/castaway/pull/13.

Add `CompactOsString`, which is inline `OsString`. When working with filesystem, conversion to `String` is not always desirable, and using compact string would be helpful.