-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Allow replacing input on the fly #1697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I'll give it a deep review in two-three days. I'm overwhelmed by other problems right now, sorry. Upon a shallow look, I'm somewhat concerned about performance since now we always clone the input. I don't know what the impact will be and I'm trying to benchmark it now. I know, CLI parsing is rarely a big concern, if at all, but clap has always been outstanding regarding to runtime speed, and some users have been choosing it exactly because of it. By the way, our current benches seem to be useless. |
Yup, I was thinking the same. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty good implementation. While I don't think we should always clone the input, we can rework it later.
Some minor improvements and questions only:
293a370
to
1f48d76
Compare
bors r+ |
Build succeeded
|
Closes #1603
I tried several different ways of implementing the above requested feature but failed because they always ended up trying to manipulate the input which is a no-go because it was a plain
Iterator
. And then the #1693 was filed, and reading it made me think that maybe we should allow input to be changed. So, I extracted it out and made it do the replacing.