diff options
| author | Kornel <kornel@cloudflare.com> | 2021-07-09 14:20:01 +0100 |
|---|---|---|
| committer | Kornel <kornel@cloudflare.com> | 2021-07-09 14:24:34 +0100 |
| commit | bc67f6bc95106ef0e0b4681a384af153a7228bf1 (patch) | |
| tree | bd93e11bf63455ef1ab86645affd242817094ac4 /library/std/src/sys | |
| parent | 8f9d0f12ebb4de99c3d907924bafd6dbc84f73f6 (diff) | |
| download | rust-bc67f6bc95106ef0e0b4681a384af153a7228bf1.tar.gz rust-bc67f6bc95106ef0e0b4681a384af153a7228bf1.zip | |
Debug formatting of raw_arg()
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/windows/process.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/library/std/src/sys/windows/process.rs b/library/std/src/sys/windows/process.rs index 1b685fcccb1..0fdf72c8067 100644 --- a/library/std/src/sys/windows/process.rs +++ b/library/std/src/sys/windows/process.rs @@ -327,9 +327,13 @@ impl Command { impl fmt::Debug for Command { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{:?}", self.program)?; + self.program.fmt(f)?; for arg in &self.args { - write!(f, " {:?}", arg)?; + f.write_str(" ")?; + match arg { + Arg::Regular(s) => s.fmt(f), + Arg::Raw(s) => f.write_str(&s.to_string_lossy()), + }?; } Ok(()) } |
