suggested API improvement: make Arg::possible_values()
more flexible
#87
Labels
C-enhancement
Category: Raise on the bar on expectations
M-breaking-change
Meta: Implementing or merging this will introduce a breaking change.
Currently it enforces the usage of
Vec<&str>
, which makes it harder to use for people who prefer different means of passing this information. They could have a statically allocated array for instance, which contains enumerations, which in turn implementAsRef<str>
to allow a light conversion.I suggest to have a look at this method's signature which uses an iterator over items that convert into a
&str
, allowing all sorts of inputs. Internally, you can still easily create theVec
you require by usingIterator::collect()
The text was updated successfully, but these errors were encountered: