(
reader: thread::JoinHandle<std::io::Result<Vec<u8>>>,
program: &Path,
stream_name: &str,
)
| 1700 | } |
| 1701 | |
| 1702 | fn join_command_reader( |
| 1703 | reader: thread::JoinHandle<std::io::Result<Vec<u8>>>, |
| 1704 | program: &Path, |
| 1705 | stream_name: &str, |
| 1706 | ) -> Result<Vec<u8>, AppError> { |
| 1707 | reader |
| 1708 | .join() |
| 1709 | .map_err(|_| { |
| 1710 | AppError::native(format!( |
| 1711 | "Unable to read {stream_name} from {}.", |
| 1712 | program.display() |
| 1713 | )) |
| 1714 | })? |
| 1715 | .map_err(|error| { |
| 1716 | AppError::native(format!( |
| 1717 | "Unable to read {stream_name} from {}: {error}", |
| 1718 | program.display() |
| 1719 | )) |
| 1720 | }) |
| 1721 | } |
| 1722 | |
| 1723 | fn command_name(program: &Path) -> &str { |
| 1724 | program |
no outgoing calls
no test coverage detected