1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Merge pull request #7350 from cakebaker/tests_make_wait_with_output_private

tests: make `wait_with_output` private
This commit is contained in:
Sylvestre Ledru 2025-02-24 10:48:31 +01:00 committed by GitHub
commit a3284e6a25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2284,7 +2284,6 @@ impl UChild {
self.tmpd.clone(), self.tmpd.clone(),
); );
#[allow(deprecated)]
let output = self.wait_with_output()?; let output = self.wait_with_output()?;
Ok(CmdResult { Ok(CmdResult {
@ -2307,8 +2306,7 @@ impl UChild {
/// ///
/// If `self.timeout` is reached while waiting or [`Child::wait_with_output`] returned an /// If `self.timeout` is reached while waiting or [`Child::wait_with_output`] returned an
/// error. /// error.
#[deprecated = "Please use wait() -> io::Result<CmdResult> instead."] fn wait_with_output(mut self) -> io::Result<Output> {
pub fn wait_with_output(mut self) -> io::Result<Output> {
// some apps do not stop execution until their stdin gets closed. // some apps do not stop execution until their stdin gets closed.
// to prevent a endless waiting here, we close the stdin. // to prevent a endless waiting here, we close the stdin.
self.join(); // ensure that all pending async input is piped in self.join(); // ensure that all pending async input is piped in