Proposal: Consume iterators instead of slices for Arg methods #2410
MS-Painter
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
Code block versions of example changes:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Not sure if this is specifically implemented this way on purpose or not,
so this is also a question aside from a proposal -
I personally found it kind of limiting, that for
Arg
builder methods such aspossible_values()
,You need to supply params of type
&[&str]
.I was wondering if there would be any issue, for methods such as
possible_values()
,To be implemented in a way similar to this:
Alternative implementation might be more useful:
These tweaks compile (didn't fully test out yet if there would be any issue with using them,
since I wasn't sure this is implemented like this on purpose),
and would help out immensely, for similar methods with this specific niche.
If this is something that could be added throughout the codebase, I would be glad to give it a go to contribute 👍
Beta Was this translation helpful? Give feedback.
All reactions