(&self)
| 198 | } |
| 199 | |
| 200 | fn to_string_pretty(&self) -> String { |
| 201 | std::iter::once(self.get_program()) |
| 202 | .chain(self.get_args()) |
| 203 | .fold(String::new(), |mut acc, element| { |
| 204 | if !acc.is_empty() { |
| 205 | acc.push(' '); |
| 206 | } |
| 207 | // SAFETY: Writes to string can't fail |
| 208 | write!(&mut acc, "{}", crate::PathQuotedDisplay::new(&element)).unwrap(); |
| 209 | acc |
| 210 | }) |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | /// Helpers intended for [`tokio::process::Command`]. |