Skip to content
This repository has been archived by the owner on May 15, 2018. It is now read-only.

Let stdout/stderr be configurable #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Let stdout/stderr be configurable #16

wants to merge 2 commits into from

Conversation

andreastt
Copy link
Contributor

@andreastt andreastt commented Dec 8, 2017

Unfortunately std::process::Stdio does not implement Copy or Clone so it can’t be stored in our struct. The only option I could find was to provide variations through a custom enum that we construct the appropriate std::process::Stdio struct from. I’m not sure if there’s a better option?


This change is Reviewable

It does not necessarily make sense to expose build_command on the
FirefoxRunner trait.  As I understand it the function should be an
internal implementation detail as you would not have any need for
constructing the command externally.
@andreastt
Copy link
Contributor Author

r? @jgraham

@andreastt
Copy link
Contributor Author

FWIW I cannot help but feel that the API could of this crate could be improved by using a builder-style approach. This would let the caller construct the appropriate std::process::Stdio type, like you do for std::process::Command, and means we could get rid of the mutable fields of FirefoxRunner and the mutable envs()/args() on the Runner trait. Given the current API it’s also not clear when the mutable data can be changed.

@andreastt
Copy link
Contributor Author

@andreastt
Copy link
Contributor Author

Ping @jgraham

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant