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 46 compact_str issues
Sort by recently updated
recently updated
newest added

It would be nice to make such code works: ```rust let s: std::borrow::Cow

There was a failing test case found when fuzzing! See [Action Run 2941196978](https://github.com/ParkMyCar/compact_str/actions/runs/2941196978)

bug
fuzz

There was a failing test case found when fuzzing! See [Action Run 2941183389](https://github.com/ParkMyCar/compact_str/actions/runs/2941183389)

bug
fuzz

* In the function `fn as_bytes` in `impl CompactString`, there is an redundant slicing (with a `self.len()` call) which is unnecessary after the update c95edd5. * This crate has documented...

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start)...

dependencies
rust

I think it makes sense to support `Arc` in `CompactString` as a new repr, it would then enable O(1) cloning, which is very handy for parser/configuration.

&1f64.to_string() == "1" &1f64.to_compact_string() == "1.0" I don't have a strong preference either way but this makes post-migration regression testing quite a pain.

`is_empty` checks both inline length and heap length: https://github.com/ParkMyCar/compact_str/blob/302c595d41373943dc432be2381b8f6a74f0ddf6/compact_str/src/repr/mod.rs#L445-L453 I believe an empty string is always stored inline. Therefore it could be reduced to: ```rs pub fn is_empty(&self) -> bool...

I believe it's possible to shave an instruction off `len()` (and probably `as_slice()` too) if static string had same discriminant as heap. Static string could instead be represented as a...