epage / clapng

A full featured, fast Command Line Argument Parser for Rust
docs.rs/clap
Apache License 2.0
0 stars 0 forks source link

Loosen requirement on using `&[]` to pass into builder functions #221

Open epage opened 2 years ago

epage commented 2 years ago

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

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).

Blocked on #1041

Debug Output

No response