This library is really cool, thanks for making this.
When rendering the results in my app, I found that I clone() String a lot. Since the results returned are not meant to be mutated by the user, it would be nice if those copies were just an increment of the reference count and not actual data copies.
I am not sure how to best approach this, however, because some users may wish to use an Arc instead. My current usecase is making dig in the browser with WASM and I do not need to use Arcs just yet. But may a type alias and a feature flag to turn that type alias into an Arc<str> is the way to go.
This library is really cool, thanks for making this.
When rendering the results in my app, I found that I
clone()Stringa lot. Since the results returned are not meant to be mutated by the user, it would be nice if those copies were just an increment of the reference count and not actual data copies.I am not sure how to best approach this, however, because some users may wish to use an
Arcinstead. My current usecase is makingdigin the browser with WASM and I do not need to useArcs just yet. But may a type alias and a feature flag to turn that type alias into anArc<str>is the way to go.