Open tarcieri opened 4 years ago
tinyvec is necessary because theoretically decompositions and compositions can map to an unbounded number of decomposed # code points. There's probably a small practical limit in what the composition data allows though
There's probably a small practical limit in what the composition data allows though
Perhaps tinyvec::ArrayVec
could work? (or could be used on no_std
w\o alloc
at least)
Sure, PRs welcome. Ideally something that switches between arrayvec and a non panicky variant
...arrayvec and a non panicky variant
Oh, now I see ArrayVec
doesn't have any fallible APIs and always panics on overflow. That's not great.
Elsewhere I use heapless::Vec
which does provide fallible APIs, and a trait like this to abstract over heapless::Vec
and heap-based data structures (really wish something like this were in core
):
https://docs.rs/veriform/0.1.0/veriform/derive_helpers/trait.TryExtend.html
I'd like to be able to use
is_nfc_quick()
/is_nfd_quick()
in a context where liballoc isn't available.It looks like the only thing linking
liballoc
right now istinyvec
. Would it be possible to maketinyvec
into an optional dependency?