-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
impl Clone for Command #22858
impl Clone for Command #22858
Conversation
I actually explicitly requested that we not implement
That being said, I'd be willing to revisit it. |
That'd be bad for me, because I rely on clonning let inputs = 0..10;
criterion.bench_prog_with_inputs("py", Command::new("python").arg("under_test.py"), inputs); Without it, doing the same operation would be unergonomic as you'll have to repeat the // one call for each value of `$N`
criterion.bench_prog("py/$N", Command::new("python").arg("under_test.py").arg("$N"));
...
// and the user must not forget to summarize the results at the end
criterion.summarize("py");
That sounds reasonable to me. I'll stick to the old |
Another option, however, would be taking a
That feels a bit heavy-handed for this particular aspect in my opinion. I believe @aturon is on vacation right now but I would be curious to hear his thoughts on this as well. |
☔ The latest upstream changes (presumably #22882) made this pull request unmergeable. Please resolve the merge conflicts. |
So, I'm uncomfortable with a |
I'd be happy with this alternative. |
@japaric Ok, I think we could probably take an |
Closing due to inactivity, but feel free to reopen with @aturon's suggestion! |
dejavu
Both (unix/windows) underlying
Command
implementations are alreadyClone
.r? @alexcrichton