nextest-runner 0.124.0

Core runner logic for cargo nextest.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright (c) The nextest Contributors
// SPDX-License-Identifier: MIT OR Apache-2.0

use std::{fs::File, io, io::PipeReader, os::windows::io::OwnedHandle, process};
use tokio::process::{ChildStderr, ChildStdout};

pub(super) fn pipe_reader_to_file(rx: PipeReader) -> File {
    File::from(OwnedHandle::from(rx))
}

pub(super) fn pipe_reader_to_child_stdout(rx: PipeReader) -> io::Result<ChildStdout> {
    ChildStdout::from_std(process::ChildStdout::from(OwnedHandle::from(rx)))
}

pub(super) fn pipe_reader_to_child_stderr(rx: PipeReader) -> io::Result<ChildStderr> {
    ChildStderr::from_std(process::ChildStderr::from(OwnedHandle::from(rx)))
}