flexstr
flexstr copied to clipboard
A flexible, simple to use, immutable, clone-efficient String replacement for Rust
It took me a while to realize what the issue was, as the error output was correct, but also easy to miss the actual typo/reason: ``` the package `x` depends...
**Context** In the most recent version of [`compact_str`](https://github.com/ParkMyCar/compact_str), we renamed `CompactStr` to `CompactString`. You can continue to use `CompactStr` but there is a deprecation warning on it. **Changes** This PR...
It'd be interesting to see under what situations box might be useful.
This was also one of they key early features for `KString` so that `liquid` could pass around data throughout the program and avoid allocations for this data.
When using fast_format, I run into this compiler error, ``` the trait bound `FlexStr: uDisplay` is not satisfied ```
`Arc` [compares pointers first](https://doc.rust-lang.org/src/alloc/sync.rs.html#3025) which normal reference equality checks do not perform. See https://htmlpreview.github.io/?https://github.com/epage/string-benchmarks-rs/blob/master/runs/2023-10-10/eq/report/index.html for a benchmark showcasing the behavior from this
`alloc::sync::Arc` is only available on platforms that support atomic loads and stores of pointers. Some targets don't have this (e.g. thumbv6, RP2040) and flexstr fails to compile. This PR gates...
This avoids relying on automatic dereference in the compiler, which can fail if any other trait impls are available.