In #1041 I proposed we use kstring crate for our strings. kstring::KString is like a Cow<'static, str> with small-string optimization. This removes lifetimes from our types but more relevant to here, offers us more Into flexibility that makes it so we can trivial implement the API we want (see #2857 for some of the problems).
Issue by epage Thursday Oct 14, 2021 at 00:35 GMT Originally opened as https://github.com/clap-rs/clap/issues/2870
Please complete the following tasks
Rust Version
rustc 1.53.0 (53cb7b09b 2021-06-17)
Clap Version
v3.0.0-beta.4
Minimal reproducible code
See #2857
Steps to reproduce the bug with the above code
See #2857
Actual Behaviour
Builders only accept
&[]
Expected Behaviour
Builders accept an
IntoIterator
Additional Context
Prior attempts
2414
2857
In #1041 I proposed we use
kstring
crate for our strings.kstring::KString
is like aCow<'static, str>
with small-string optimization. This removes lifetimes from our types but more relevant to here, offers us moreInto
flexibility that makes it so we can trivial implement the API we want (see #2857 for some of the problems).Blocked on #1041
Debug Output
No response