Skip to content
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

Added method as_std_mut to tokio::process::Command #6608

Merged

Conversation

tglane
Copy link
Contributor

@tglane tglane commented Jun 2, 2024

Motivation

Citing from #6523:

Sometimes I want to access a mutable reference of std::process::Command out of the tokio counterpart, so I can access some unstable functions in std to update Command, but tokio only provides an as_std method returning a shared reference.

Solution

I added a method as_std_mut(&mut self) -> &mut std::process::Command to tokio::process::Command to get mutable access to the inner std command structure.

This closes #6523

@mox692 mox692 added A-tokio Area: The main tokio crate M-process Module: tokio/process labels Jun 3, 2024
Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@Darksonn Darksonn merged commit 8fca6f6 into tokio-rs:master Jun 4, 2024
82 checks passed
@tglane tglane deleted the 6523-tokio-process-command-as-std-mut branch June 13, 2024 19:43
This was referenced Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate M-process Module: tokio/process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tokio::process::Command::as_std_mut() method.
3 participants